<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

DEDECMS网页TITLE标签修改的利于SEO优化

时间:2020-12-09

据说现在百度基本上都不看keyword了(当然我们不能不写),但是现在的关键在于网页上的title。所以一定要把title好好做做。主要是涉及到一个如何实现"三级栏目_二级栏目_一级栏目_网站名称"的问题。似水星辰的title基本上是这样做的:

首页:

<title>{dede:global.cfg_webname/}</title>,在“系统设置”→“系统基本参数”中将首页的标题信息都写在网站名称里面。

栏目页:

找到include/typelink.class.php第164行左右,找到:

1 $this->valuePositionName = $tinfos['typename'].$this->SplitSymbol.$this->valuePositionName;

修改为:

1 $this->valuePositionName = $this->valuePositionName.$this->SplitSymbol.$tinfos['typename'];

即可。

       第一个标签{dede:field.seotitle /} 是调用栏目的SEO标题。如果您对栏目中间的连接符不满意,可以修改include/arc.listview.class.php,找到55行

1 $this->Fields['title'] = ereg_replace("[<>]"," / ",$this->TypeLink->GetPositionLink(false));

把 / 删除 注意留一个空格 "  "

文章页:

01 <title>{dede:field.seotitle/} {dede:field name='title'/}-{dede:field name='position' runphp='yes'}
02 $tc="-"; //分隔符
03 $tw=$GLOBALS['cfg_list_symbol']; //调用位置分隔符
04 @me=html2text(@me); //去除html标签
05 $tf=split($tw,@me); //分解成数组
06 for($ta=(count($tf)-2);$ta>=1;$ta--){ //循环赋值给$tk
07
0