WordPress博客系统搜索引擎优化seo全攻略
<p><strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>1.空间的选择</strong><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'> </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>wordpress要求 php+mysql的支持,rewrite功能,比如apache的mod-rewrite或iis rewrite。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>空间的速度,Google已经明确把空间的速度列入网站排名要素之一,所以选择一个快速稳定的空间是seo的基础。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>并且快速稳定的空间对 用户体验也很好. </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>2.WordPress 主题的选择</strong><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'> </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>选择一个优秀的主题是seo的重要条件之一,有些主题本身就做了一定的seo优化,所以选择一款好的主题是 wordpress seo的基础之一。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>wordpress的主题推荐选择代码简洁,div+css架构的,图片,js代码越少越好,当然并不是完全不能使用js代码和图片。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>3.title 的优化</strong><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'> </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>wordpress的title优化一般在主题的header.php文件中,title的写法一般是首页设置 为:关键词-关键词-关键词-网站名称。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>内容页:标题-网站名称。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>title的修改,如果是对php和wordpress主题函数比较熟悉 的,可以自己动手修改。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>如果不懂的可以使用一些插件,比如all in seo插件,可以简单的对title进行rewrite,设置关键词和描述。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><strong style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>4.keyword 和description</strong><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'> </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>如果使用了all in seo插件,也可以直接设置,或者使用其他类似的插件。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>需要注意的是,all in seo插件对百度的支持不大好,现在使用all in seo插件设置的描述百度无法抓取。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>所以中文网站做百度优化的千万不要使用all in seo插件,用了也不能设置keyword和description。还有noindex选项,千万不能选择,用了百度干死你。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>小残博客就是直接使用的在header.php头部加入一下代码 </span></p>
<div style='margin: 8px 0px 1.1em; padding: 0px 0px 5px; outline: none; line-height: normal; border: 1px solid rgb(165, 165, 248); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-family: "Courier New", monospace; overflow: hidden; width: 686px; word-break: break-all;'>
<p style="margin: 0px; padding: 5px 5px 5px 10px; outline: none; line-height: 21.6px; font-weight: bold; background: rgb(244, 245, 255); border-bottom: 1px solid rgb(242, 251, 246); height: 15px;">
<span style="line-height: 14px; font-size: 14px; float: left; padding-left: 5px;">PHP Code</span><span style="line-height: 12px; font-weight: normal; float: right; cursor: pointer;">复制内容到剪贴板</span></p>
<div id="code_4843" style="margin: 0px; padding: 0px; outline: none; line-height: 21.6px;">
<ol style="margin: 0px 1px 0px 45px; padding: 2px 0px; outline: none; list-style-position: initial; list-style-image: initial; line-height: 25px; word-break: break-word; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-left: 1px solid rgb(221, 221, 221); color: rgb(92, 92, 92);">
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"><span style="line-height: 14px; color: rgb(221, 0, 0);">$description</span><span style="line-height: 14px;"> = </span><span style="line-height: 14px; color: blue;">"小残博客(www.exehack.net)关注网络安全、IT行业、网络安全文章、网络资源、电脑技术、网络安全技术、网络安全知识、互联网安全知识、原创网络安全博客"</span><span style="line-height: 14px;">; </span></span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = </span><span style="line-height: 14px; font-size: 14px; color: blue;">"关注网络安全,网站漏洞,网络安全,网络安全技术,网络安全知识,网络安全教程,黑客新闻,服务器安全,网络安全文章,系统安全"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">;} </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: blue; font-weight: bold;">elseif</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> (is_single() || is_page()) { </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description1</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = get_post_meta(</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$post</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">->ID, </span><span style="line-height: 14px; font-size: 14px; color: blue;">"description"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">, true); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description2</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = mb_strimwidth(</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">strip_tags</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">(apply_filters </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">(</span><span style="line-height: 14px; font-size: 14px; color: blue;">'the_content'</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">, </span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$post</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">->post_content)), 0, 200, </span><span style="line-height: 14px; font-size: 14px; color: blue;">"…"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = </span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description1</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> ? </span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description1</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> : </span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description2</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">; </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = get_post_meta(</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$post</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">->ID, </span><span style="line-height: 14px; font-size: 14px; color: blue;">"keywords"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">, true); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: blue; font-weight: bold;">if</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">(</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> == </span><span style="line-height: 14px; font-size: 14px; color: blue;">''</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">) { </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$tags</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = wp_get_post_tags(</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$post</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">->ID); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: blue; font-weight: bold;">foreach</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> (</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$tags</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> </span><span style="line-height: 14px; font-size: 14px; color: blue; font-weight: bold;">as</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> </span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$tag</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> ) { </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = </span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> . </span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$tag</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">->name . </span><span style="line-height: 14px; font-size: 14px; color: blue;">", "</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">;} </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = rtrim(</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">, </span><span style="line-height: 14px; font-size: 14px; color: blue;">', '</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">);} </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> } </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: blue; font-weight: bold;">elseif</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> (is_category()) { </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = category_description(); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = single_cat_title(</span><span style="line-height: 14px; font-size: 14px; color: blue;">''</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">, false);} </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: blue; font-weight: bold;">elseif</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> (is_tag()){ </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = tag_description(); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = single_tag_title(</span><span style="line-height: 14px; font-size: 14px; color: blue;">''</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">, false); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">} </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = trim(</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">strip_tags</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">(</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$description</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">)); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> = trim(</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">strip_tags</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">(</span><span style="line-height: 14px; font-size: 14px; color: rgb(221, 0, 0);">$keywords</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">)); </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);">?> </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"><meta name=</span><span style="line-height: 14px; font-size: 14px; color: blue;">"description"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> content=</span><span style="line-height: 14px; font-size: 14px; color: blue;">"<?php echo $description; ?>"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> /> </span></p>
</li>
<li style="margin: 0px; padding: 0px 0px 0px 5px; outline: none; list-style: decimal; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(170, 0, 0);">
<p>
<span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"><meta name=</span><span style="line-height: 14px; font-size: 14px; color: blue;">"keywords"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> content=</span><span style="line-height: 14px; font-size: 14px; color: blue;">"<?php echo $keywords; ?>"</span><span style="line-height: 14px; font-size: 14px; color: rgb(0, 0, 0);"> /> </span></p>
</li>
</ol>
</div>
</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<strong>5. 固定链接</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
wordpress的默认固定链接是www.exehack.net/?p=32的形式,是动态链接对搜索引擎不 太友好,所以需要修改。<br>
直接通过设置-固定链接选项,可以方便的修改固定链接的形式。至于选择哪种链接形式,其实主要看个人喜好。<br>
推荐选择 /%postname%/形式。需要注意的是,固定链接要在网站建立之初就确立好,以后切勿修改,更改固定链接会对网站权重造成很大影响,即使使用301 重定向也是一样的,所以不要修改固定链接。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<strong>6.robots.txt</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
robots.txt 文件放在根目录下面,是给搜索引擎设置的爬行规则,可以规定搜索引擎可以爬行那些页面。<br>
wordpress的robots.txt写法,可以搜索一下,并 没有标准答案,主要是注意禁止搜索引擎抓取后台文件即可。<br>
可以参考本站的写法http://www.exehack.net/robots.txt</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<strong>7.sitemap.xml</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
sitemap 是一个xml格式的网站地图文件,通过提交到搜索引擎,可以使搜索引擎更加容易抓取你的网站,sitemap是Google率先推出的,最近百度也支持 sitemap的提交,不过Google和百度的sitemap文件格式是有一些区别的。<br>
wordpress的sitemap文件生成,直接使用插件即 可。wordpress的插件安装,在后台点击添加插件,然后直接搜索安装即可。<br>
Google的sitemap插件名是Google XML Sitemaps,百度是Baidu Sitemap Generator。</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
<strong>8.内部链接</strong></p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
可以使用wordpress related post插件,它可以根据文章关键词生成一个相关文章列表,对于网站内部链接和用户体验都是有好处的。</p>
頁:
[1]