[文章目录]显示/隐藏
Emlog程序默认只提供了自定义首页标题、站点关键字和站点描述的设置,而分类页面并没有相关的SEO设置,在一定程度上显然不利于分类页面的SEO优化,因此给分类增加同样的自定义设置非常有必要,那么要如何给分类增加自定义标题、关键词和描述的设置?
操作步骤:
1、下载安装模板设置插件tpl_options后(点击下载插件),在后台——插件中启用模板设置插件;
2、然后在当前使用模板的根目录创建一个options.php文件,添加以下代码:
- <?php
- /*@support tpl_options*/
- !defined('EMLOG_ROOT') && exit('access deined!');
- $options = array(
- 'catetitle' => array(
- 'type' => 'text',
- 'name' => '分类页面标题设置',
- 'values' => array('',),
- 'depend' => 'sort',
- 'unsorted' => false,
- 'description' => '左侧选择分类,在输入框中输入分类自定义标题。',
- ),
- 'catekeywords' => array(
- 'type' => 'text',
- 'name' => '分类页面关键词设置',
- 'values' => array('',),
- 'depend' => 'sort',
- 'unsorted' => false,
- 'description' => '左侧选择分类,在输入框中输入分类关键词。',
- ),
- 'catedescription' => array(
- 'type' => 'text',
- 'name' => '分类页面描述设置',
- 'multi' => 'true',
- 'values' => array('',),
- 'depend' => 'sort',
- 'unsorted' => false,
- 'description' => '左侧选择分类,在输入框中输入分类描述。',
- ),
- );