首页 >

织梦DedeCMS网页TITLE标签修改的利于SEO优化

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

织梦DedeCMS网页TITLE标签修改的利于SEO优化

首页:

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

栏目页:

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

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

修改为:

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

即可。

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

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

把 / 删除 注意留一个空格 ” “

文章页:

{dede:field.seotitle/} {dede:field name='title'/}-{dede:field name='position' runphp='yes'}$tc="-"; //分隔符$tw=$GLOBALS['cfg_list_symbol']; //调用位置分隔符@me=html2text(@me); //去除html标签$tf=split($tw,@me); //分解成数组for($ta=(count($tf)-2);$ta>=1;$ta--){ //循环赋值给$tk$tk.=trim($tf[$ta]).$tc;}$tk=substr($tk,0,-1);@me=$tk; //赋值给@me</pre></p><br>
		<div class="tag"> <a href="https://www.liuzhongwei.com/tags/dede7" rel="tag">Dede采集</a> <a href="https://www.liuzhongwei.com/tags/dedecms4" rel="tag">织梦DedeCMS</a> <a href="https://www.liuzhongwei.com/tags/dedesys" rel="tag">织梦后台</a></div>
	</div><!-- .entry-content -->
<hr>
	<header class="lbox">
        <div class="post-content">
		    <span style="float:left;padding-right:10px;"><a href="https://www.liuzhongwei.com/page/4100.html" rel="bookmark" title="在织梦DedeCMS文章列表中添加hot,new图标"> <img src="https://liuzhongwei2023.oss-cn-shanghai.aliyuncs.com/uploads/dede/19948.jpg"  alt="织梦DedeCMS网页TITLE标签修改的利于SEO优化" /> </a></span>
		    <li><a href="https://www.liuzhongwei.com/page/4100.html" rel="bookmark" title="在织梦DedeCMS文章列表中添加hot,new图标">在织梦DedeCMS文章列表中添加hot,new图标</a></li>
		    <p>在织梦DedeCMS文章列表中添加hot,new图标 | 在织梦DedeCMS文章列表中添加hot,new图标 ... </p>
        </div>
	</header>    
	<header class="lbox">
        <div class="post-content">
		    <span style="float:left;padding-right:10px;"><a href="https://www.liuzhongwei.com/page/7451.html" rel="bookmark" title="织梦DedeCMS设置网站的绝对路径"> <img src="https://liuzhongwei2023.oss-cn-shanghai.aliyuncs.com/uploads/dede/19948.jpg"  alt="织梦DedeCMS网页TITLE标签修改的利于SEO优化" /> </a></span>
		    <li><a href="https://www.liuzhongwei.com/page/7451.html" rel="bookmark" title="织梦DedeCMS设置网站的绝对路径">织梦DedeCMS设置网站的绝对路径</a></li>
		    <p>织梦DedeCMS设置网站的绝对路径 | 织梦DedeCMS设置网站的绝对路径 ... </p>
        </div>
	</header>    
	<header class="lbox">
        <div class="post-content">
		    <span style="float:left;padding-right:10px;"><a href="https://www.liuzhongwei.com/page/4938.html" rel="bookmark" title="织梦DedeCMS网站模板路径安全设置技巧从此远离盗用"> <img src="https://liuzhongwei2023.oss-cn-shanghai.aliyuncs.com/uploads/dede/19948.jpg"  alt="织梦DedeCMS网页TITLE标签修改的利于SEO优化" /> </a></span>
		    <li><a href="https://www.liuzhongwei.com/page/4938.html" rel="bookmark" title="织梦DedeCMS网站模板路径安全设置技巧从此远离盗用">织梦DedeCMS网站模板路径安全设置技巧从此远离盗用</a></li>
		    <p>织梦DedeCMS网站模板路径安全设置技巧从此远离盗用 | 织梦DedeCMS网站模板路径安全设置技巧从此远离盗用 ... </p>
        </div>
	</header>    
	 <footer class="entry-footer">
		<span class="cat-links">Posted in 未分类</span> | <span class="tags-links">Tagged <a href="https://www.liuzhongwei.com/tags/dede7" rel="tag">Dede采集</a>, <a href="https://www.liuzhongwei.com/tags/dedecms4" rel="tag">织梦DedeCMS</a>, <a href="https://www.liuzhongwei.com/tags/dedesys" rel="tag">织梦后台</a></span>	</footer><!-- .entry-footer -->
<!-- #post-## -->

	<nav class="navigation post-navigation" aria-label="文章">
		<h2 class="screen-reader-text">文章导航</h2>
		<div class="nav-links"><div class="nav-previous"><a href="https://www.liuzhongwei.com/page/420493.html" rel="prev">2022年值得了解的6款 vue 库【“爆”】</a></div><div class="nav-next"><a href="https://www.liuzhongwei.com/page/426303.html" rel="next">php yaf视频教程,你认为曾经最好的语言PHP过时了吗 – PHP基础 – 前端,树莓派 网页 php源码</a></div></div>
	</nav>
		</main><!-- #main -->
	</section><!-- #primary -->


<aside id="secondary" class="widget-area col-sm-12 col-md-12 col-lg-4" role="complementary">
<hr>
	<section id="block-4" class="widget widget_block">
<hr class="wp-block-separator has-alpha-channel-opacity"/>
</section></aside><!-- #secondary -->
			</div><!-- .row -->
		</div><!-- .container -->
	</div><!-- #content -->
    

	<footer id="colophon" class="site-footer" role="contentinfo">
		<div class="container">
            <div class="site-info">
                © 牛的日记 | www.liuzhongwei.com <br> 网站部分内容来源于网友供稿,若有侵权请联系删除,970928#QQ.com<br>
                           </div><!-- close .site-info -->
		</div>
	</footer><!-- #colophon -->
</div><!-- #page -->
	<!--colorcode_start-->
	<script type="text/javascript" src="https://www.liuzhongwei.com/wp-content/plugins/colorcode/js/wp-colorcode.js?ver=20121102"></script>
	<script type="text/javascript">
		window.onload = function() {
			DlHighlight.HELPERS.highlightByName('colorcode', 'pre','', false);
		} 
	</script>	
	<!--colorcode_end-->


<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?362c2492cf3ac506a1c032629e391abd";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</body>
</html>