[文章目录]显示/隐藏

Emlog程序默认只提供了自定义首页标题、站点关键字和站点描述的设置,而分类页面并没有相关的SEO设置,在一定程度上显然不利于分类页面的SEO优化,因此给分类增加同样的自定义设置非常有必要,那么要如何给分类增加自定义标题、关键词和描述的设置?

 

操作步骤:

1、下载安装模板设置插件tpl_options后(点击下载插件),在后台——插件中启用模板设置插件;

2、然后在当前使用模板的根目录创建一个options.php文件,添加以下代码:

 
  1. <?php    
  2. /*@support tpl_options*/    
  3. !defined('EMLOG_ROOT') && exit('access deined!');    
  4. $options = array(    
  5.     'catetitle' => array(    
  6.         'type' => 'text',    
  7.         'name' => '分类页面标题设置',    
  8.         'values' => array('',),    
  9.         'depend' => 'sort',    
  10.         'unsorted' => false,    
  11.         'description' => '左侧选择分类,在输入框中输入分类自定义标题。',    
  12.     ),    
  13.     'catekeywords' => array(    
  14.         'type' => 'text',    
  15.         'name' => '分类页面关键词设置',    
  16.         'values' => array('',),    
  17.         'depend' => 'sort',    
  18.         'unsorted' => false,    
  19.         'description' => '左侧选择分类,在输入框中输入分类关键词。',    
  20.     ),    
  21.     'catedescription' => array(    
  22.         'type' => 'text',    
  23.         'name' => '分类页面描述设置',    
  24.         'multi' => 'true',    
  25.         'values' => array('',),    
  26.         'depend' => 'sort',    
  27.         'unsorted' => false,    
  28.         'description' => '左侧选择分类,在输入框中输入分类描述。',    
  29.     ),    
  30. );