我们在做zblog主题的时候,seo信息是必须考虑进去的因素之一。要想获得优质的排名,就要注重页面的每一个细节。
页面标题,关键词和描述是每个页面中必须设置的。
只需要在默认调用标题,关键词和描述上面增加一个判断就可以实现了:
PHP
elseif($type == 'tag'){ $topTitle = $tag->Name.$separator.$zbp->name; $keywords = $tag->Name; $description = $tag->Intro; }
PHP
<title>{$topTitle}</title><meta name="keywords" content="{$keywords}" /><meta name="description" content="{$description}" />
如果是tag页面,就调用tag名称作为标题,和关键词,描述为tag的介绍。
- 上一篇: zblogphp首页、列表页、内容页的标题、关键词、描述的操作方法
- 下一篇: zblog模板文件说明
发表评论