WordPress SEO ☞ WordPress网站终极优化指南



温馨提示:因为此篇教程写于2013年初,大家都知道互联网技术日新月异,转眼就已经2015年,WordPress SEO的技术又有了很多改进和完善,比如我们发现最佳的WordPress SEO插件为 WordPress Seo by Yoast,比如Google取消了Google Author Rank的显示,还有就是Google最新一次蜂鸟算法的更新着重强调了内容质量的重要性,意味着大家的重心要从刻意的过度优化,转而逐步过度到注重网站原创内容建设上来,结合有效的社会化营销,这里推荐一款非常不错的WP自动发布到Social Media的插件:NextScripts: Social Networks Auto-Poster,这款插件的强大之处在于,只要你的服务器在国外,比如美国,只要你按照插件提示正确设置了Facebook,Twitter等的API信息,网站就可以自动将你发布的新内容同步到Facebook,Twitter等社会化媒体平台上,而无需担心防火墙屏蔽之类的问题,我们将一如既往的关注WordPress SEO,持续不断的为大家带来最新的SEO技术和技巧。

最新消息,东方设计学院 WordPress SEO 系列视频教程正在持续更新中,目前为了不至于让视频传播过于泛滥,设置了登陆权限,有兴趣查看的用户可以简单填写一个索取测试账号的表单,提交一份表单给我们,我们将尽快回复测试账号登陆密码,视频教程地址:https://www.eastdesign.net/wordpress-seo-tutorial/

WordPress网站终极优化指南

WordPress 是一个注重美学、易用性和网络标准的个人信息发布平台。WordPress 虽为免费的开源软件,但其价值无法用金钱来衡量。现在,它开始越来越多地应用于企业门户网站设计中。

随着WordPress用来建站的频率越来越高,有关 WordPress SEO 方面的咨询频率也随之升高,很多朋友和客户都来咨询如何借助 WordPress 平台来做SEO优化达到不付费就能获取较好排名的效果。

引言

本文用了终极优化指南作为标题,事实上还是有些夸大了点,但是希望借此机会将这几年从事WordPress开发和推广所获得的经验通过这篇文章分享给大家,算是抛砖引玉吧,如有任何纰漏的地方,也希望大家不吝赐教,所谓学海无涯嘛,永远没有最好只有更好,好了废话不多说,言归正传。

优化指南目录

  1. WordPress网站终极优化指南
  2. 1 基础层面的 WordPress SEO
    1. 1.1 网址格式
      1. 1.1.1 固定链接
      2. 1.1.2 WWW 和 不带WWW
      3. 1.1.3 去除无意义的字符
    2. 1.2 优化你的网站页面标题
      1. 1.2.1 使用 WordPress SEO Ultimate 插件来设置最佳的页面标题
    3. 1.3 优化你的描述description
    4. 1.4 图片 优化
    5. 1.5 XML sitemaps提交
  3. 2 模版优化
    1. 2.1 Breadcrumbs面包屑设置
    2. 2.2 H1 H2 H3 H4等的使用
    3. 2.3 优化你的代码
    4. 2.4 网页载入速度指标
    5. 2.5 重新设计你的侧边栏
    6. 2.6 HTML 网站地图
    7. 2.7 作者高亮
  4. 3 高级 WordPress SEO 和重复的内容
    1. 3.1 屏蔽不需要的归档
    2. 3.2 设置好的分页
    3. 3.3 不跟随无关的链接
    4. 3.4 Canonical
  5. 4 良好的网站结构有利于提高排名
    1. 4.1 页面取代文章
    2. 4.2 旧瓶装新酒
    3. 4.3 链接到相关文章
  6. 5 评论优化
    1. 5.1 评分微数据 Rating 和 AggregateRating 的使用
    2. 5.2 评论社会化平台扩展
  7. 6 测试SEO优化效果
  8. 7 WordPress SEO总结

1 基础层面的 WordPress SEO

抛开一切的SEO, 单从本身架构来说,WordPress算是我用过的所有CMS里边SEO架构做得最好的一个了,没有第二,当然现在互联网上网站成千上万,不做任何优化想凭空就获得较好的排名和流量几乎没有可能,因此本指南正式基于此考虑,借助WordPress自身优秀的架构,辅助合理的SEO设置和技巧势必获得事半功倍的效果,为你搭建的WordPress网站插上一双飞翔的翅膀。

优化第一步就是修改固定链接,你可以进入后台点击 设置 → 固定链接 默认的固定链接格式是:?p= 最好固定链接格式是/post-name/ 或者,首选是 /%postname%/:

permalink

如果要包含category类别进去,你可以选择自定义格式修改值为 /%postname%/: 如果之前你使用的是默认的 ?p= 修改为新的固定链接格式以后,WordPress会自动为你跳转所有的链接,同样适用于修改 /%postname%/ 为 /%category%/%postname%/的情况。

1.1.2 WWW 和 不带WWW

你的考虑你的网站对外显示为 www.eastdesign.net 或者 eastdesign.net , 请确保后台 设置 → 常规 里边你设置的是对的格式:

www-or-nonwww

同时还需要到Google管理员工具那里设置一下首选域,点击 Google Webmaster Tools. 如下图所示设置将网址显示为 www.eastdesign.net:

WordPress SEO ☞ WordPress网站终极优化指南_第1张图片

然后就是把不带WWW的域名做301跳转,永久跳转到www.eastdesign.net,这样做的好处就是防止域名格式太多分散权重,另外也对网站品牌造成不统一的影响,如何做301跳转,下边将贴出apache和nginx里边的设置代码供参考:
Nginx代码如下:

注意其中的 “ listen [::]:80; ” 为分别监听了ipv4和ipv6,如果你的站点没有设置ipv6监听则格式为:“listen 80” 。
Apache代码如下:

注意:Apache的代码仅仅列出了301跳转实现的部分,并不是全部。

1.1.3 去除无意义的字符

此条一般适用于英文网址,比如你输入一段很长的英文句子作为标题,固定链接里边将会变得很长,而事实上里边诸如 “a”, “and”, “the” 等对于搜索引擎并没有太大的意义,而且导致了很长的网址格式,自动去掉这些字符,而保留核心的关键词将会更有利于SEO,实现这条推荐安装著名的SEO Ultimate,该插件带了类似的功能和其他很多非常不错的SEO方面的功能。

1.2 优化你的网站页面标题

网站页面标题</code>,是决定搜索排名的重要因素,不仅仅是因为其显示在浏览器顶部状态栏,而且是访客通过搜索引擎看到的第一眼的信息。</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">很多博客的页面标题格式仍然是“Blog title » Blog Archive » Keyword rich post title” 或者 “Blog title » Keyword rich post title”,而事实上为了获得更好的流量和排名,标题应该做一些改动,原因如下:</p> <ul style="margin-top:0px; margin-bottom:10px"> <li style="">搜索引擎给予靠前位置的词语更高的权重,因此如果你的标题关键词位于站点名称前面,将获得更好的排名显示;</li> <li style="margin-bottom:0px">访客搜索某个关键词的时候也是优先看到位于前面的词语,而你与当前页面直接匹配的标题关键词位于前面,显然更容易吸引访客点击。</li> </ul> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">因此显而易见最佳的标题格式应该是优先显示当前页面的实际标题内容,然后才是当前网站的品牌名称,这里推荐大家看一遍非常不错Aaron Wall的文章: <span class="removed_link" style="text-decoration:line-through; margin-bottom:0px">Google & SEO Friendly Page Titles</span>.</p> <h4 id="wpseo-plugin-titles" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:10px; margin-bottom:10px; font-size:18px"> 1.2.1 使用 WordPress SEO Ultimate 插件来设置最佳的页面标题</h4> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">使用前面有提到过的WordPress SEO Ultimate 插件可以很好的设置符合搜索习惯的页面标题,如下图所示:</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px"><a href="http://img.e-com-net.com/image/info8/bd9ed5a7f7904e67bfd1b138da764037.jpg" target="_blank"><img class="aligncenter size-full wp-image-4815 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/bd9ed5a7f7904e67bfd1b138da764037.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第2张图片" width="564" height="560" style="border:0px; vertical-align:middle; max-width:100%; height:auto!important; display:block; margin-left:auto; margin-right:auto; margin-bottom:0px;border:1px solid black;"></a></p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">其他对应页面的设置可以点击各自的tab标签进行特定的设置,这个插件的默认设置已经算是最佳的一个设置了,所以不需要做太多的修改即可。</p> <h3 id="descriptions" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 1.3 优化你的描述description</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">现在我们优化好了页面标题,接下来我们要关注于页面的meta descriptions了,当然目前最新的搜索引擎算法已经不再把网页meta的keywords和descriptions作为很重要的权重指标了,但是设置合适的descriptions,将给予访客对你网站一个良好的印象,因为你设置的descriptions将会优先显示在搜索引擎的描述里边。</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">有关这块的优化,SEO Ultimate同样做得很优秀,简单截图显示如下:</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px"><a href="http://img.e-com-net.com/image/info8/6c469ff4bfc94b058edeec7c92b5c0d4.jpg" target="_blank"><img class="aligncenter size-full wp-image-4817 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/6c469ff4bfc94b058edeec7c92b5c0d4.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第3张图片" width="565" height="289" style="border:0px; vertical-align:middle; max-width:100%; height:auto!important; display:block; margin-left:auto; margin-right:auto; margin-bottom:0px;border:1px solid black;"></a></p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">如截图所示,该插件默认的设置已经就可以了,正如上边所说的那样,基于网页meta的keywords和descriptions已经远没有几年前那么重要的考虑,也不建议花太多的心思去优化,尤其过度的堆砌关键词会适得其反。</p> <h3 id="images" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 1.4 图片优化</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">众所周知,你的给每张图片尽可能的配上好的标题和alt标签,但是一旦图片非常多的时候,处理类似的工作将变得非常的耗时而且低效,这里向大家推荐一款不错的插件:<span class="removed_link" style="text-decoration:line-through; margin-bottom:0px">SEO Friendly Images</span>, 这款插件将自动为你图片匹配上标题和alt标签。</p> <h3 id="xmlsitemaps" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 1.5 XML sitemaps提交</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">XML sitemaps提交是为了告诉Google和别的搜索引擎你的网站有了任何新的内容,类似的功能同样向大家推荐一款很不错的插件:BWP Google XML Sitemaps 这个插件设置和使用非常简单,设置好以后会生成一个 这样格式的sitemap地址,然后将这个地址提交给Google Webmaster tools:</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px"><a href="http://img.e-com-net.com/image/info8/a62b01cb1c1541b1966bb6db71f75967.jpg" target="_blank"><img class="aligncenter size-full wp-image-4819 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/a62b01cb1c1541b1966bb6db71f75967.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第4张图片" width="580" height="570" style="border:0px; vertical-align:middle; max-width:100%; height:auto!important; display:block; margin-left:auto; margin-right:auto; margin-bottom:0px;border:1px solid black;"></a></p> <h2 id="template" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:30px"> 2 模版优化</h2> <h3 id="bread-crumbs" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 2.1 Breadcrumbs面包屑设置</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">你需要给详情的文章或者页面设置面包屑导航,面包屑导航的格式一般是这样的:“Home > Articles > WordPress SEO” ,设置面包屑导航的好处如下:</p> <ul style="margin-top:0px; margin-bottom:10px"> <li style="">它使得访客很容易的访问你网站的每个层次结构的页面,用户体验得到很大的提升;</li> <li style="margin-bottom:0px">它同时也使得搜索引擎很容易的识别出你网站的结构,并且在Google的搜索结果里边,设置了面包屑的网址将会显示出具体的网址格式替代单一的当前网址:<br style=""> <a href="http://img.e-com-net.com/image/info8/30c0a7974074405f8650c24836e0134c.jpg" target="_blank"><img class="aligncenter size-full wp-image-4820 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/30c0a7974074405f8650c24836e0134c.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第5张图片" width="522" height="131" style="border:0px; vertical-align:middle; max-width:100%; height:auto!important; display:block; margin-left:auto; margin-right:auto; margin-bottom:0px;border:1px solid black;"></a></li> </ul> <h3 id="headings" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 2.2 H1 H2 H3 H4等的使用</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">尽管几乎所有的模版都正确使用了H标签,请确保你的文章标题为<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace; font-size:12.6px; padding:2px 4px; color:rgb(199,37,78); background-color:rgb(249,242,244)"><h1></code>,而不是其他任何标签,网站首页你的博客名称也必须是<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace; font-size:12.6px; padding:2px 4px; color:rgb(199,37,78); background-color:rgb(249,242,244)"><h1></code>,同时在在详情页面和类别列表页面,不得出现超过一个的<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace; font-size:12.6px; padding:2px 4px; color:rgb(199,37,78); background-color:rgb(249,242,244)"><h3></code>,侧边栏不得出现<code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace; font-size:12.6px; padding:2px 4px; color:rgb(199,37,78); background-color:rgb(249,242,244)"><h2></code> 和 <code style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace; font-size:12.6px; padding:2px 4px; color:rgb(199,37,78); margin-bottom:0px; background-color:rgb(249,242,244)"><h3></code>。</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">做以上修改对于模版文件的编辑来说非常容易实现,想了解为什么合适的H标签使用会如此重要,请参考这篇文章:<span class="removed_link" style="text-decoration:line-through; margin-bottom:0px">Semantic HTML and SEO</span>。</p> <h3 id="codeclean" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 2.3 优化你的代码</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">所有模版需要用到的javascript和css文件,请存储到特定的外部文件里边,以确保模版文件干净整洁,同时可以确保访客可以初次访问网页的时候缓存这些文件,搜索引擎不需要经常性的索引这些内容。</p> <h3 id="speed" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 2.4 网页载入速度指标</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">搜索引擎每天能抓取你网站多少个页面的一个重要因素,就是你网站的速度是否够快,你可以通过以下三种方式来加快你的网站载入速度:</p> <ol style="margin-left:-10px; margin-top:0px; margin-bottom:10px"> <li style="line-height:1.8em; list-style:none">优化你的模版文件读取数据库的频率到最低,也就是减少读取数据库的查询次数;</li> <li style="line-height:1.8em; list-style:none">安装一个缓存插件,我重点推荐W3 Total Cache,尽管这个插件设置相对来说有一点复杂,但是的确可以很有效的提升你站点的整体performance;</li> <li style="line-height:1.8em; list-style:none; margin-bottom:0px">W3 Total Cache 如果搭配 CDN 比如 MaxCDN将会获得更好的效果。</li> </ol> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">当然页面载入速度另外一个非常重要的因素还是服务器的性能,一款性能不错的服务器将会非常有效的提升你网站的整体性能,这里我们向你推荐专为WordPress优化过的东方数据WordPress主机</p> <h3 id="sidebarthink" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 2.5 重新设计你的侧边栏</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">你真的需要让你的网站侧边栏放满了外部链接吗?Google最近极大的放低了类似外链给你朋友网站带来的效果,因此类似链接的防止对于你朋友网站效果极小,不如重新考虑设计一下,仅仅在首页放置与别人交换的友情链接,而不是所有内页的侧边栏。</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">同样对于搜索引擎来看,在文章的详情页面侧边栏放置太多跟本文无关的内容势必也会误导搜索引擎,导致权重的分散。</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">或许某天WordPress后台将允许你设置多个侧边栏,但是至少现在你得手工去为你的网站设置两个侧边栏,分别用于首页和内页,或者多余两个分别对应详情页面和列表页面等。</p> <h3 id="htmlsitemaps" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 2.6 HTML 网站地图</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">对于一个博客网站来说类似的网站地图可有可无,因为博客本身结构相对来说简单,层次也很清晰,但是对于用WordPress来建设的企业网站则不一样,层次结构相对要复杂很多,针对类似的网站,设计一个整站层级结构的网站地图对于访客和搜索引擎来说都是一个不错的选择。</p> <h3 id="author-highlight" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 2.7 作者高亮</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">何为作者高亮,我给你截图显示一下效果你就很容易理解了:</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px"><a href="http://img.e-com-net.com/image/info8/ccf2d60fe6534b22b4ab35b8f1eecda7.jpg" target="_blank"><img class="aligncenter size-full wp-image-4828 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/ccf2d60fe6534b22b4ab35b8f1eecda7.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第6张图片" width="559" height="143" style="border:0px; vertical-align:middle; max-width:100%; height:auto!important; display:block; margin-left:auto; margin-right:auto;border:1px solid black;"></a><br style=""> 上图所示最底下一栏即为作者高亮显示的效果,尤其对于有在Google Plus上开设信息页的站长来说,效果尤其明显,一方面可以增加网站在google搜索栏上的效果丰富性,另外也宣传了自己,一举多得。<br style="margin-bottom:0px"> 那么如何实现类似的效果呢,同样还是回到了强大的SEO Ultimate插件,通过这个插件可以很轻松的实现类似的效果,当然大家不要误会为本指南是专门为这个插件而写,本人跟这个插件作者素昧平生,仅仅是因为这个插件的确写得很不错,算是免费为这个插件做些推介吧,设置方法截图如下:</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px"><a href="http://img.e-com-net.com/image/info8/91e67283a2104dc58e37eb10006a62c8.jpg" target="_blank"><img class="aligncenter size-full wp-image-4830 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/91e67283a2104dc58e37eb10006a62c8.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第7张图片" width="568" height="240" style="border:0px; vertical-align:middle; max-width:100%; height:auto!important; display:block; margin-left:auto; margin-right:auto; margin-bottom:0px;border:1px solid black;"></a></p> <h2 id="advancedseo" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:30px"> 3 高级 WordPress SEO 和重复的内容设置</h2> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">一旦你做好了以上所有这些的基础设置以后,你将开始做一件简单的事情,就是重复内容的设置,WordPress自带了三套内容检索方式:</p> <ol style="margin-left:-10px; margin-top:0px; margin-bottom:10px"> <li style="line-height:1.8em; list-style:none">按照日期归档</li> <li style="line-height:1.8em; list-style:none">按照类别</li> <li style="line-height:1.8em; list-style:none; margin-bottom:0px">按照标签</li> </ol> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">合理的用好这三套内容检索方式,将会为你网站带来更好的内容结构和更丰富的内链。此处设置较为简单而且主要取决于网站站长对站点内容布局的要求来设置,因此这里不做大篇幅的讲解。</p> <h3 id="disablearchives" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 3.1 屏蔽不需要的归档</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">如果你的博客仅仅是一个作者写的所有文章,那么就没有必要保留作者的归档。</p> <h3 id="pagination" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 3.2 设置好的分页</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">当搜索引擎抓取到一个类别列表页面的时候,如果如果没有设置好的分页格式,势必得跳跃几十个页面才能回到此类别的第一个页面,因此良好的分页格式变得很为重要,实现分页的插件很多,我们推荐这款WP-PageNavi。</p> <h3 id="nofollowmeta" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 3.3 不跟随无关的链接</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">另外一个提升WordPress SEO效果的技巧就是停止跟随任何登陆和注册页面。</p> <h3 id="canonical" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 3.4 Canonical</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">Canonical即为页面链接的唯一性,设置了Canonical属性以后,将告诉搜索引擎,该页面的唯一URL,这样避免因为URL的多种格式造成权重的分散,SEO Ultimate插件对于这个属性有直接的解决方案,截图如下:</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px"><a href="http://img.e-com-net.com/image/info8/d351933258344382bc526e0e734960ab.jpg" target="_blank"><img class="aligncenter size-full wp-image-4834 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/d351933258344382bc526e0e734960ab.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第8张图片" width="571" height="216" style="border:0px; vertical-align:middle; max-width:100%; height:auto!important; display:block; margin-left:auto; margin-right:auto; margin-bottom:0px;border:1px solid black;"></a></p> <h2 id="structure" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:30px"> 4 良好的网站结构有利于提高排名</h2> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">博客因为先天具备的良好的站点结构等因素很有利于搜索引擎的索引和收录,当然也得取决于你是否很好的利用起来:</p> <h3 id="pagesvsposts" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 4.1 页面取代文章</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">你应该注意到了,你正在看的这篇文章并不是一篇post而是一篇page,为什么呢?首先,这篇指南的网址格式需要是直接继承在网站首页域名后边,中间不想让他带任何的其他格式,比如category或者tag之类的,再者为了体现WordPress SEO这个关键词的密度,用页面来编辑有先天的优势,方便随时编辑更新。</p> <h3 id="newwine" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 4.2 旧瓶装新酒</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">如果一篇文章在搜索引擎上某些关键词取得了较高的排名,你可以做一下操作来获得更好的效果:</p> <ul style="margin-top:0px; margin-bottom:10px"> <li style="">新建一个<span style="font-weight:700; margin-bottom:0px">页面</span>重新编辑更好的内容和关键词密度;</li> <li style="">修改旧的这篇文章的slug为另外一个网址,方便新建页面;</li> <li style="">发布你的新页面地址为这篇文章的地址,如何通过页面的固定链接构造出这篇文章的网址相信不是很难的事情;</li> <li style="">发送一封邮件给所有跟随了你这篇文章的用户,说明你已经更新了这篇文章;</li> <li style="margin-bottom:0px">等待这篇文章再次被搜索引擎索引更新;</li> </ul> <h3 id="relatedposts" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 4.3 链接到相关文章</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">让搜索引擎更容易通过当前文章索引到旧的同类别的文章的方式,就是添加相关文章插件,在此推荐这款不错的插件Yet Another Related Posts Plugin或者自己通过自定义模版PHP代码也不难实现类似的功能。</p> <h2 id="comment-optimization" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:30px"> 5 评论优化</h2> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">网站的评论功能是网站内容交互性上的一个很好的体现,尤其对于一些不错的原创文章,获得大量有意义的评论,一定程度上也相当于当前页面有了定期的内容更新,有关评论优化这块我想简单分两种方式来说明:</p> <h3 id="comment-microdata" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 5.1 评分微数据 Rating 和 AggregateRating 的使用</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">提示:以下文字为了方便说明,部分引用了国内不错的WordPress SEO作者 mg12 的教程<span class="removed_link" style="text-decoration:line-through">评分微数据 Rating 和 AggregateRating 的使用方法</span>,在此对他表示感谢,当然如果有涉及侵权等,请来信告知,我将第一时间处理。<br style=""> 评分也叫星评, 多在文章, 商品等有主体信息的网页中使用. 虽然 <span class="removed_link" style="text-decoration:line-through">schema.org</span> 上对 <span style="font-weight:700"><span class="removed_link" style="text-decoration:line-through; margin-bottom:0px">Rating</span></span> 和 <span style="font-weight:700"><span class="removed_link" style="text-decoration:line-through; margin-bottom:0px">AggregateRating </span></span>及其使用方法有详细的说明, 但有些地方不注意容易搞错。<br style="margin-bottom:0px"> Rating 指的是某一次评分, 可能只有一个数值 (ratingValue), 表示此次评分的分数.</p> <h4 style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:10px; margin-bottom:10px; font-size:18px"> 微数据 Rating</h4> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">AggregateRating 是评分汇总, 除了评分数值, 至少还应该包含评分的数量 (ratingCount 或者 reviewCount), 表示这个分数是多少次评分的平均值.</p> <h4 style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:10px; margin-bottom:10px; font-size:18px"> 微数据 AggregateRating</h4> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">在搜索结果中, AggregateRating 可能会被显示, 但 Rating 不会. 很做网站做了 AggregateRating 忽略 Rating, 可能是因为这个原因, 包括 Google Play 平台.</p> <h4 style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:10px; margin-bottom:10px; font-size:18px"> ratingCount 和 reviewCount 的区别</h4> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">上一段提到 AggregateRating 中的评分数量 ratingCount 和 reviewCount, 两者都表明数量, 但意义不一样.<br style=""> 我希望博客的读者可以为文章进行评价, 而这些读者可以不对文章进行评论和回复, 所以使用了 ratingCount, 这表明获得的票数. 在 Google 搜索结果中显示如下.<br style=""> 基于上述对于微数据的解释文档,并参考 mg12 的方式,成功改造了 WP-PostRatings 插件,完美实现了网站页面在Google引擎上的评分的显示。<br style=""> Google结构化数据测试工具地址:<br style=""> 事实上对于WP-PostRatings的改造并不算很大,主要是配合WP模版的改造,简单说明如下:<br style="margin-bottom:0px"> 编辑/wp-content/plugins/wp-postratings/wp-postratings.php 文件,找到第83行的代码:</p> <div id="crayon-5710a3d76a675676576942" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="width:850px; padding:0px; margin:12px auto; font-family:Monaco,MonacoRegular,'Courier New',monospace; float:none; height:auto; overflow:hidden!important; position:relative!important; direction:ltr!important; border:1px solid rgb(153,153,153)!important; font-size:12px!important; line-height:15px!important; background:rgb(253,253,253)!important"> <div class="crayon-plain-wrap" style="border:0px; padding:0px!important; margin:0px!important; height:auto!important; background:0px 50%"> </div> <div class="crayon-main" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; width: 848px; overflow: auto; max-height: 500px; position: relative; z-index: 1; background: 0px 50%;"> <table class="crayon-table " style="box-sizing: border-box; font-size: 12px; margin-bottom: 0px; margin-left: 0px; width: auto !important; border-spacing: 0px !important; border-collapse: collapse !important; border: none !important; padding: 0px !important; margin-right: 0px !important; margin-top: 0px !important; table-layout: auto !important; background: none !important;"> <tbody style="box-sizing: border-box; margin-bottom: 0px;"> <tr class="crayon-row" style="box-sizing: border-box; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important; background: 0px 50%;"> <td class="crayon-nums " style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; color: rgb(84, 153, 222) !important; background: rgb(223, 239, 255) !important;"> <div class="crayon-nums-content" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 15px !important; background: 0px 50%;"> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 30px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 1 </div> </div></td> <td class="crayon-code" style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; width: 830px; background: 0px 50%;"> <div class="crayon-pre" style="box-sizing: border-box; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; border: none !important; line-height: 15px !important; background: none !important;"> <div class="crayon-line" id="crayon-5710a3d76a675676576942-1" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">$</span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">attributes</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">'id="post-ratings-'</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">$</span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">ratings_id</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">'" class="post-ratings" itemscope itemtype="http://schema.org/Product"'</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(51, 51, 51) !important;">;</span> </div> </div></td> </tr> </tbody> </table> </div> </div> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">替换为:</p> <div id="crayon-5710a3d76a67f650488941" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="box-sizing: border-box; width: 850px; padding: 0px; margin: 12px auto; font-family: Monaco, MonacoRegular, 'Courier New', monospace; float: none; height: auto; overflow: hidden !important; position: relative !important; direction: ltr !important; border: 1px solid rgb(153, 153, 153) !important; text-shadow: none !important; font-size: 12px !important; line-height: 15px !important; background: rgb(253, 253, 253) !important;"> <div class="crayon-plain-wrap" style="box-sizing: border-box; border: 0px; padding: 0px !important; margin: 0px !important; height: auto !important; background: 0px 50%;"> </div> <div class="crayon-main" style="border:0px; padding:0px; margin:0px; width:848px; overflow:auto; max-height:500px; position:relative; z-index:1; background:0px 50%"> <table class="crayon-table " style="font-size:12px; margin-bottom:0px; margin-left:0px; width:auto!important; border-spacing:0px!important; border-collapse:collapse!important; border:none!important; padding:0px!important; margin-right:0px!important; margin-top:0px!important; table-layout:auto!important; background:none!important"> <tbody style="margin-bottom:0px"> <tr class="crayon-row" style="margin:0px!important; padding:0px!important; border:none!important; vertical-align:top!important; background:0px 50%"> <td class="crayon-nums " style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; color:rgb(84,153,222)!important; background:rgb(223,239,255)!important"> <div class="crayon-nums-content" style="border:0px; padding:0px; margin:0px; white-space:nowrap; line-height:15px!important; background:0px 50%"> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:30px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 1 </div> </div> </td> <td class="crayon-code" style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; width:830px; background:0px 50%"> <div class="crayon-pre" style="padding:0px; margin:0px; white-space:pre; overflow:visible; border:none!important; line-height:15px!important; background:none!important"> <div class="crayon-line" id="crayon-5710a3d76a67f650488941-1" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">$</span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">attributes</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">'id="post-ratings-'</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">.</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">$</span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">ratings_id</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">.</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">'" class="post-ratings" itemscope itemtype="http://schema.org/AggregateRating"'</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(51,51,51)!important">;</span> </div> </div> </td> </tr> </tbody> </table> </div> </div> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">接下来就是对模版的改造了,简单说明以下:<br style="margin-bottom:0px"> 首先找到模版头部header.php,</p> <div id="crayon-5710a3d76a684837611566" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="width:850px; padding:0px; margin:12px auto; font-family:Monaco,MonacoRegular,'Courier New',monospace; float:none; height:auto; overflow:hidden!important; position:relative!important; direction:ltr!important; border:1px solid rgb(153,153,153)!important; font-size:12px!important; line-height:15px!important; background:rgb(253,253,253)!important"> <div class="crayon-plain-wrap" style="border:0px; padding:0px!important; margin:0px!important; height:auto!important; background:0px 50%"> </div> <div class="crayon-main" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; width: 848px; overflow: auto; max-height: 500px; position: relative; z-index: 1; background: 0px 50%;"> <table class="crayon-table " style="box-sizing: border-box; font-size: 12px; margin-bottom: 0px; margin-left: 0px; width: auto !important; border-spacing: 0px !important; border-collapse: collapse !important; border: none !important; padding: 0px !important; margin-right: 0px !important; margin-top: 0px !important; table-layout: auto !important; background: none !important;"> <tbody style="box-sizing: border-box; margin-bottom: 0px;"> <tr class="crayon-row" style="box-sizing: border-box; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important; background: 0px 50%;"> <td class="crayon-nums " style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; color: rgb(84, 153, 222) !important; background: rgb(223, 239, 255) !important;"> <div class="crayon-nums-content" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 15px !important; background: 0px 50%;"> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 1 </div> </div></td> <td class="crayon-code" style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; width: 830px; background: 0px 50%;"> <div class="crayon-pre" style="box-sizing: border-box; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; border: none !important; line-height: 15px !important; background: none !important;"> <div class="crayon-line" id="crayon-5710a3d76a684837611566-1" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">body</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> </div></td> </tr> </tbody> </table> </div> </div> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">替换为</p> <div id="crayon-5710a3d76a68a717815014" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="box-sizing: border-box; width: 850px; padding: 0px; margin: 12px auto; font-family: Monaco, MonacoRegular, 'Courier New', monospace; float: none; height: auto; overflow: hidden !important; position: relative !important; direction: ltr !important; border: 1px solid rgb(153, 153, 153) !important; text-shadow: none !important; font-size: 12px !important; line-height: 15px !important; background: rgb(253, 253, 253) !important;"> <div class="crayon-plain-wrap" style="box-sizing: border-box; border: 0px; padding: 0px !important; margin: 0px !important; height: auto !important; background: 0px 50%;"> </div> <div class="crayon-main" style="border:0px; padding:0px; margin:0px; width:848px; overflow:auto; max-height:500px; position:relative; z-index:1; background:0px 50%"> <table class="crayon-table " style="font-size:12px; margin-bottom:0px; margin-left:0px; width:auto!important; border-spacing:0px!important; border-collapse:collapse!important; border:none!important; padding:0px!important; margin-right:0px!important; margin-top:0px!important; table-layout:auto!important; background:none!important"> <tbody style="margin-bottom:0px"> <tr class="crayon-row" style="margin:0px!important; padding:0px!important; border:none!important; vertical-align:top!important; background:0px 50%"> <td class="crayon-nums " style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; color:rgb(84,153,222)!important; background:rgb(223,239,255)!important"> <div class="crayon-nums-content" style="border:0px; padding:0px; margin:0px; white-space:nowrap; line-height:15px!important; background:0px 50%"> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 1 </div> </div> </td> <td class="crayon-code" style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; width:830px; background:0px 50%"> <div class="crayon-pre" style="padding:0px; margin:0px; white-space:pre; overflow:visible; border:none!important; line-height:15px!important; background:none!important"> <div class="crayon-line" id="crayon-5710a3d76a68a717815014-1" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">body </span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">itemtype</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">"http://schema.org/WebPage"</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">itemscope</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">""</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> </div> </td> </tr> </tbody> </table> </div> </div> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">然后找到single.php,进行简单的改造如下:</p> <div id="crayon-5710a3d76a68f868022147" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="width:850px; padding:0px; margin:12px auto; font-family:Monaco,MonacoRegular,'Courier New',monospace; float:none; height:auto; overflow:hidden!important; position:relative!important; direction:ltr!important; border:1px solid rgb(153,153,153)!important; font-size:12px!important; line-height:15px!important; background:rgb(253,253,253)!important"> <div class="crayon-plain-wrap" style="border:0px; padding:0px!important; margin:0px!important; height:auto!important; background:0px 50%"> </div> <div class="crayon-main" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; width: 848px; overflow: auto; max-height: 500px; position: relative; z-index: 1; background: 0px 50%;"> <table class="crayon-table " style="box-sizing: border-box; font-size: 12px; margin-bottom: 0px; margin-left: 0px; width: auto !important; border-spacing: 0px !important; border-collapse: collapse !important; border: none !important; padding: 0px !important; margin-right: 0px !important; margin-top: 0px !important; table-layout: auto !important; background: none !important;"> <tbody style="box-sizing: border-box; margin-bottom: 0px;"> <tr class="crayon-row" style="box-sizing: border-box; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important; background: 0px 50%;"> <td class="crayon-nums " style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; color: rgb(84, 153, 222) !important; background: rgb(223, 239, 255) !important;"> <div class="crayon-nums-content" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 15px !important; background: 0px 50%;"> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 1 </div> <div class="crayon-num crayon-striped-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(49, 124, 197) !important; background: rgb(200, 225, 250) !important;"> 2 </div> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 3 </div> <div class="crayon-num crayon-striped-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(49, 124, 197) !important; background: rgb(200, 225, 250) !important;"> 4 </div> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 5 </div> <div class="crayon-num crayon-striped-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(49, 124, 197) !important; background: rgb(200, 225, 250) !important;"> 6 </div> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 7 </div> <div class="crayon-num crayon-striped-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(49, 124, 197) !important; background: rgb(200, 225, 250) !important;"> 8 </div> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 9 </div> <div class="crayon-num crayon-striped-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(49, 124, 197) !important; background: rgb(200, 225, 250) !important;"> 10 </div> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 11 </div> <div class="crayon-num crayon-striped-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(49, 124, 197) !important; background: rgb(200, 225, 250) !important;"> 12 </div> </div></td> <td class="crayon-code" style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; width: 823px; background: 0px 50%;"> <div class="crayon-pre" style="box-sizing: border-box; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; border: none !important; line-height: 15px !important; background: none !important;"> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-1" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">article </span> <span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(128, 0, 128) !important;">class</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">"thepost"</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">itemtype</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">"http://schema.org/Article"</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">itemscope</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">""</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-2" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: rgb(247, 247, 247) !important;"> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">fieldset</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-3" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">legend</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">></span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">h1 </span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">itemprop</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">"name"</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">></span> <span class="crayon-ta" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(255, 0, 0) !important;"><?php</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">the_title</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">;</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-ta" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(255, 0, 0) !important;">?></span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">h1</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">></span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">legend</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-4" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: rgb(247, 247, 247) !important;"> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">article </span> <span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(128, 0, 128) !important;">class</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">"single-content"</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-5" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-ta" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(255, 0, 0) !important;"><?php</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-st" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(128, 0, 128) !important;">if</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">function_exists</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">'the_ratings'</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">{</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">the_ratings</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">;</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">}</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-ta" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(255, 0, 0) !important;">?></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-6" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: rgb(247, 247, 247) !important;">   </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-7" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span> <span class="crayon-ta" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(255, 0, 0) !important;"><?php</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">the_content</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">__</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">'<img src="/images/more.jpg" alt="more" border="0" />'</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">;</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-ta" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(255, 0, 0) !important;">?></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-8" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: rgb(247, 247, 247) !important;"> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">br</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-9" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">div </span> <span class="crayon-t" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(128, 0, 128) !important;">class</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">"clear"</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">></span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">div</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-10" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: rgb(247, 247, 247) !important;"> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">article</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-11" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">    </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">fieldset</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-12" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: rgb(247, 247, 247) !important;"> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">/</span> <span class="crayon-i" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important;">article</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> </div></td> </tr> </tbody> </table> </div> </div> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">至此改造完成以后,你再对当前文章进行以下评分,然后通过Google结构化数据测试工具测试一下看看,见证奇迹的时刻终于到了,你会看到你的网址在Google上显示的效果多了一行亮眼的黄色评分记录,是否很有成就感,当然这个评分记录并不会直接影响你网站关键词的排名,但是你不觉得多了一条如此亮眼的黄色评分记录给你网站增色不少吗,至少多了更多访客点击进来的吸引力,侧面提升了网站的流量。</p> <h3 id="comment-social" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">5.2 评论社会化平台扩展</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">有关评论社会化平台的扩展方案,相信很多网站都已经启用了,其中做得不错的,国外的当推Disqus Comment System,国内的就很多了,个人推荐多说社会化评论系统,速度较快,界面干净整洁,想安装的自己去搜索一下即可。</p> <h2 id="measure" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">6 测试SEO优化效果</h2> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">一个好的WordPress SEO方案不仅仅需要良好的执行各种优化方法,同时还得通过专业的工具测试具体优化效果,推荐非常不错的测试工具<span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">Google Analytics</span>。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">另外一款极力推荐的工具就是这篇指南前面篇幅里边提到过的<span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">Google Webmaster Tools</span>。</p> <h2 id="conclusion" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">7 WordPress SEO总结</h2> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">花了整整一下午的时间来写这篇WordPress SEO指南,脑细胞死了不少,但也收获颇丰,至少证明自己还是有耐心专注的做好一件事情的,现在的社会太过于浮躁,适当找机会让自己安静的做好一件事情,你会发现有意想不到的收获,离题了,回归本文主旨,有关SEO优化向来就是一项极大极其复杂的工程,绝非短期内突击一下就可以取得良好效果的,需要持之以恒的耐心和决心,还要耐得住寂寞,因为这个过程往往非常的枯燥乏味。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">好了本文到此先收尾了,当然还会做持续的更新,大家看完有任何想法请不吝赐教!</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><span style="box-sizing: border-box; margin-bottom: 0px; text-decoration: underline;"><span style="box-sizing: border-box; margin-bottom: 0px; color: rgb(255, 0, 0);">最新更新提示:经本站反复测试,本教程提到的 SEO Ultimate 插件有一定的漏洞和不足,现统一建议更换为更强大的 WordPress SEO by Yoast ,这款插件是目前评测下来最佳的WordPress 免费seo插件,大家可以安装测试一下,设置也很简单,另外如果根据本教程安装了 SEO Ultimate 的,请安装 <span style="box-sizing: border-box; margin-bottom: 0px; color: rgb(255, 0, 0);">SEO Data Transporter</span> 这款插件,然后根据这款插件的操作流程可以很轻松的实现从 SEO Ultimate 到 WordPress SEO by Yoast 的迁移。</span></span></p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">另外也顺便做个广告,如有意找我们团队做WordPress SEO的朋友,请点击以下右侧索取报价按钮,填写一份简单的表单提交给我们即可,谢谢大家!\</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><br></p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">转自:https://www.eastdesign.net/wordpress-seo/</p> </div> </div> <div style="top: 0px;"> <div class="vc_message_box vc_message_box-3d vc_message_box-rounded vc_color-juicy_pink" style="box-sizing: border-box; border: 1px solid rgb(251, 199, 197); overflow: hidden; margin: 0px 0px 21.74px; padding: 1em 1em 1em 4em; position: relative; font-size: 14px; border-radius: 5px; color: rgb(163, 35, 31); box-shadow: rgb(248, 152, 149) 0px 5px 0px; font-family: PingHei, FZLTXHK, 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; line-height: 20px; background-color: rgb(254, 245, 245);"> <p style="box-sizing: border-box; color: rgb(51, 51, 51); line-height: 28px; margin-top: 0px; margin-bottom: 10px;">温馨提示:因为此篇教程写于2013年初,大家都知道互联网技术日新月异,转眼就已经2015年,WordPress SEO的技术又有了很多改进和完善,比如我们发现最佳的WordPress SEO插件为 WordPress Seo by Yoast,比如Google取消了Google Author Rank的显示,还有就是Google最新一次蜂鸟算法的更新着重强调了内容质量的重要性,意味着大家的重心要从刻意的过度优化,转而逐步过度到注重网站原创内容建设上来,结合有效的社会化营销,这里推荐一款非常不错的WP自动发布到Social Media的插件:NextScripts: Social Networks Auto-Poster,这款插件的强大之处在于,只要你的服务器在国外,比如美国,只要你按照插件提示正确设置了Facebook,Twitter等的API信息,网站就可以自动将你发布的新内容同步到Facebook,Twitter等社会化媒体平台上,而无需担心防火墙屏蔽之类的问题,我们将一如既往的关注WordPress SEO,持续不断的为大家带来最新的SEO技术和技巧。</p> <p style="box-sizing: border-box; color: rgb(51, 51, 51); line-height: 28px; margin-top: 0px; margin-bottom: 0px;">最新消息,东方设计学院 WordPress SEO 系列视频教程正在持续更新中,目前为了不至于让视频传播过于泛滥,设置了登陆权限,有兴趣查看的用户可以简单填写一个索取测试账号的表单,提交一份表单给我们,我们将尽快回复测试账号登陆密码,视频教程地址:https://www.eastdesign.net/wordpress-seo-tutorial/</p> </div> <div class="wpb_text_column wpb_content_element " style="box-sizing: border-box; margin-bottom: 35px; color: rgb(51, 51, 51); font-family: PingHei, FZLTXHK, 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 14px; line-height: 20px;"> <div class="wpb_wrapper" style="box-sizing: border-box; margin-bottom: 0px;"> <h2 id="wordpress-seo2" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">WordPress网站终极优化指南</h2> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">WordPress 是一个注重美学、易用性和网络标准的个人信息发布平台。WordPress 虽为免费的开源软件,但其价值无法用金钱来衡量。现在,它开始越来越多地应用于企业门户网站设计中。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">随着WordPress用来建站的频率越来越高,有关 WordPress SEO 方面的咨询频率也随之升高,很多朋友和客户都来咨询如何借助 WordPress 平台来做SEO优化达到不付费就能获取较好排名的效果。</p> <h3 style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">引言</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">本文用了终极优化指南作为标题,事实上还是有些夸大了点,但是希望借此机会将这几年从事WordPress开发和推广所获得的经验通过这篇文章分享给大家,算是抛砖引玉吧,如有任何纰漏的地方,也希望大家不吝赐教,所谓学海无涯嘛,永远没有最好只有更好,好了废话不多说,言归正传。</p> <h4 id="table-of-contents" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">优化指南目录</h4> <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 10px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">WordPress网站终极优化指南</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">1 基础层面的 WordPress SEO <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 0px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">1.1 网址格式 <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 0px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">1.1.1 固定链接</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">1.1.2 WWW 和 不带WWW</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">1.1.3 去除无意义的字符</li> </ol></li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">1.2 优化你的网站页面标题 <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 0px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">1.2.1 使用 WordPress SEO Ultimate 插件来设置最佳的页面标题</li> </ol></li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">1.3 优化你的描述description</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">1.4 图片 优化</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">1.5 XML sitemaps提交</li> </ol></li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">2 模版优化 <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 0px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">2.1 Breadcrumbs面包屑设置</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">2.2 H1 H2 H3 H4等的使用</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">2.3 优化你的代码</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">2.4 网页载入速度指标</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">2.5 重新设计你的侧边栏</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">2.6 HTML 网站地图</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">2.7 作者高亮</li> </ol></li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">3 高级 WordPress SEO 和重复的内容 <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 0px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">3.1 屏蔽不需要的归档</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">3.2 设置好的分页</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">3.3 不跟随无关的链接</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">3.4 Canonical</li> </ol></li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">4 良好的网站结构有利于提高排名 <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 0px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">4.1 页面取代文章</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">4.2 旧瓶装新酒</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">4.3 链接到相关文章</li> </ol></li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">5 评论优化 <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 0px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">5.1 评分微数据 Rating 和 AggregateRating 的使用</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">5.2 评论社会化平台扩展</li> </ol></li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">6 测试SEO优化效果</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">7 WordPress SEO总结</li> </ol> <h2 id="basicseo" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">1 基础层面的 WordPress SEO</h2> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">抛开一切的SEO, 单从本身架构来说,WordPress算是我用过的所有CMS里边SEO架构做得最好的一个了,没有第二,当然现在互联网上网站成千上万,不做任何优化想凭空就获得较好的排名和流量几乎没有可能,因此本指南正式基于此考虑,借助WordPress自身优秀的架构,辅助合理的SEO设置和技巧势必获得事半功倍的效果,为你搭建的WordPress网站插上一双飞翔的翅膀。</p> <h3 id="permalinks" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">1.1 网址格式</h3> <h4 id="permalink-structure" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">1.1.1 固定链接</h4> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">优化第一步就是修改固定链接,你可以进入后台点击 设置 → 固定链接 默认的固定链接格式是:<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);">?p=<postid></code> 最好固定链接格式是<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);">/post-name/</code> 或者,首选是 <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; margin-bottom: 0px; background-color: rgb(249, 242, 244);">/%postname%/</code>:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><img class="aligncenter size-full wp-image-4808 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/3d6d86263d824e978c9ee81bfec67785.jpg" alt="permalink" width="588" height="32" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;"></p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">如果要包含category类别进去,你可以选择自定义格式修改值为 <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);">/%postname%/</code>: 如果之前你使用的是默认的 <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);">?p=<postid></code> 修改为新的固定链接格式以后,WordPress会自动为你跳转所有的链接,同样适用于修改 <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);">/%postname%/</code> 为 <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; margin-bottom: 0px; background-color: rgb(249, 242, 244);">/%category%/%postname%/</code>的情况。</p> <h4 id="www-non-www" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">1.1.2 WWW 和 不带WWW</h4> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">你的考虑你的网站对外显示为 www.eastdesign.net 或者 eastdesign.net , 请确保后台 设置 → 常规 里边你设置的是对的格式:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/584fde0f1023471dbeeee5fd21b85874.jpg" target="_blank"><img class="aligncenter size-full wp-image-4809 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/584fde0f1023471dbeeee5fd21b85874.jpg" alt="www-or-nonwww" width="650" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;" height="91"></a></p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">同时还需要到Google管理员工具那里设置一下首选域,点击 <span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">Google Webmaster Tools</span>. 如下图所示设置将网址显示为 www.eastdesign.net:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/88eb77582f90411fb159afbf3dd08983.jpg" target="_blank"><img class="aligncenter size-full wp-image-4810 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/88eb77582f90411fb159afbf3dd08983.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第9张图片" width="650" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;;border:1px solid black;" height="163"></a></p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">然后就是把不带WWW的域名做301跳转,永久跳转到www.eastdesign.net,这样做的好处就是防止域名格式太多分散权重,另外也对网站品牌造成不统一的影响,如何做301跳转,下边将贴出apache和nginx里边的设置代码供参考:<br style="box-sizing: border-box; margin-bottom: 0px;">Nginx代码如下:</p> <div id="crayon-5710a3d76a646704053771" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="box-sizing: border-box; width: 850px; padding: 0px; margin: 12px auto; font-family: Monaco, MonacoRegular, 'Courier New', monospace; float: none; height: auto; overflow: hidden !important; position: relative !important; direction: ltr !important; border: 1px solid rgb(153, 153, 153) !important; text-shadow: none !important; font-size: 12px !important; line-height: 15px !important; background: rgb(253, 253, 253) !important;"> <div class="crayon-plain-wrap" style="box-sizing: border-box; border: 0px; padding: 0px !important; margin: 0px !important; height: auto !important; background: 0px 50%;"> </div> <div class="crayon-main" style="border:0px; padding:0px; margin:0px; width:848px; overflow:auto; max-height:500px; position:relative; z-index:1; background:0px 50%"> <table class="crayon-table" style="font-size:12px; margin-bottom:0px; margin-left:0px; width:auto!important; border-spacing:0px!important; border-collapse:collapse!important; border:none!important; padding:0px!important; margin-right:0px!important; margin-top:0px!important; table-layout:auto!important; background:none!important"> <tbody style="margin-bottom:0px"> <tr class="crayon-row" style="margin:0px!important; padding:0px!important; border:none!important; vertical-align:top!important; background:0px 50%"> <td class="crayon-nums " style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; color:rgb(84,153,222)!important; background:rgb(223,239,255)!important"> <div class="crayon-nums-content" style="border:0px; padding:0px; margin:0px; white-space:nowrap; line-height:15px!important; background:0px 50%"> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 1 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 2 </div> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 3 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 4 </div> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 5 </div> </div> </td> <td class="crayon-code" style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; width:830px; background:0px 50%"> <div class="crayon-pre" style="padding:0px; margin:0px; white-space:pre; overflow:visible; border:none!important; line-height:15px!important; background:none!important"> <div class="crayon-line" id="crayon-5710a3d76a646704053771-1" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">server</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(51,51,51)!important">{</span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a646704053771-2" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important"> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">listen</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">[</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">::</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">]</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">:</span> <span class="crayon-cn" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(206,0,0)!important">80</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(51,51,51)!important">;</span> </div> <div class="crayon-line" id="crayon-5710a3d76a646704053771-3" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">server_name </span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">eastdesign</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">.</span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">net</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(51,51,51)!important">;</span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a646704053771-4" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important"> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">rewrite</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">^</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">(</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">.</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">*</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">)</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">$</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">  </span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">permanent</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(51,51,51)!important">;</span> </div> <div class="crayon-line" id="crayon-5710a3d76a646704053771-5" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(51,51,51)!important">}</span> </div> </div> </td> </tr> </tbody> </table> </div> </div> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">注意其中的 “ listen [::]:80; ” 为分别监听了ipv4和ipv6,如果你的站点没有设置ipv6监听则格式为:“listen 80” 。<br style="margin-bottom:0px"> Apache代码如下:</p> <div id="crayon-5710a3d76a659966379777" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="width:850px; padding:0px; margin:12px auto; font-family:Monaco,MonacoRegular,'Courier New',monospace; float:none; height:auto; overflow:hidden!important; position:relative!important; direction:ltr!important; border:1px solid rgb(153,153,153)!important; font-size:12px!important; line-height:15px!important; background:rgb(253,253,253)!important"> <div class="crayon-plain-wrap" style="border:0px; padding:0px!important; margin:0px!important; height:auto!important; background:0px 50%"> </div> <div class="crayon-main" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; width: 848px; overflow: auto; max-height: 500px; position: relative; z-index: 1; background: 0px 50%;"> <table class="crayon-table" style="box-sizing: border-box; font-size: 12px; margin-bottom: 0px; margin-left: 0px; width: auto !important; border-spacing: 0px !important; border-collapse: collapse !important; border: none !important; padding: 0px !important; margin-right: 0px !important; margin-top: 0px !important; table-layout: auto !important; background: none !important;"> <tbody style="box-sizing: border-box; margin-bottom: 0px;"> <tr class="crayon-row" style="box-sizing: border-box; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important; background: 0px 50%;"> <td class="crayon-nums " style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; color: rgb(84, 153, 222) !important; background: rgb(223, 239, 255) !important;"> <div class="crayon-nums-content" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 15px !important; background: 0px 50%;"> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 1 </div> <div class="crayon-num crayon-striped-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(49, 124, 197) !important; background: rgb(200, 225, 250) !important;"> 2 </div> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 3 </div> </div></td> <td class="crayon-code" style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; width: 830px; background: 0px 50%;"> <div class="crayon-pre" style="box-sizing: border-box; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; border: none !important; line-height: 15px !important; background: none !important;"> <div class="crayon-line" id="crayon-5710a3d76a659966379777-1" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">ServerName </span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">esdesign</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 78, 208) !important;">net</span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a659966379777-2" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: rgb(247, 247, 247) !important;"> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">RewriteEngine </span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 78, 208) !important;">on</span> </div> <div class="crayon-line" id="crayon-5710a3d76a659966379777-3" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">RewriteRule</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">^</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">(</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">*</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">)</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">$</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">https</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">:</span> <span class="crayon-c" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(255, 128, 0) !important;">//www.eastdesign.net$1 [R=301,L]</span> </div> </div></td> </tr> </tbody> </table> </div> </div> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">注意:Apache的代码仅仅列出了301跳转实现的部分,并不是全部。</p> <h4 id="stopwords" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">1.1.3 去除无意义的字符</h4> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">此条一般适用于英文网址,比如你输入一段很长的英文句子作为标题,固定链接里边将会变得很长,而事实上里边诸如 “a”, “and”, “the” 等对于搜索引擎并没有太大的意义,而且导致了很长的网址格式,自动去掉这些字符,而保留核心的关键词将会更有利于SEO,实现这条推荐安装著名的SEO Ultimate,该插件带了类似的功能和其他很多非常不错的SEO方面的功能。</p> <h3 id="titles" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">1.2 优化你的网站页面标题</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">网站页面标题<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; margin-bottom: 0px; background-color: rgb(249, 242, 244);"><title></code>,是决定搜索排名的重要因素,不仅仅是因为其显示在浏览器顶部状态栏,而且是访客通过搜索引擎看到的第一眼的信息。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">很多博客的页面标题格式仍然是“Blog title » Blog Archive » Keyword rich post title” 或者 “Blog title » Keyword rich post title”,而事实上为了获得更好的流量和排名,标题应该做一些改动,原因如下:</p> <ul style="box-sizing: border-box; margin-top: 0px; margin-bottom: 10px;"> <li style="box-sizing: border-box;">搜索引擎给予靠前位置的词语更高的权重,因此如果你的标题关键词位于站点名称前面,将获得更好的排名显示;</li> <li style="box-sizing: border-box; margin-bottom: 0px;">访客搜索某个关键词的时候也是优先看到位于前面的词语,而你与当前页面直接匹配的标题关键词位于前面,显然更容易吸引访客点击。</li> </ul> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">因此显而易见最佳的标题格式应该是优先显示当前页面的实际标题内容,然后才是当前网站的品牌名称,这里推荐大家看一遍非常不错Aaron Wall的文章: <span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">Google & SEO Friendly Page Titles</span>.</p> <h4 id="wpseo-plugin-titles" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">1.2.1 使用 WordPress SEO Ultimate 插件来设置最佳的页面标题</h4> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">使用前面有提到过的WordPress SEO Ultimate 插件可以很好的设置符合搜索习惯的页面标题,如下图所示:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/bd9ed5a7f7904e67bfd1b138da764037.jpg" target="_blank"><img class="aligncenter size-full wp-image-4815 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/bd9ed5a7f7904e67bfd1b138da764037.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第10张图片" width="564" height="560" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;;border:1px solid black;"></a></p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">其他对应页面的设置可以点击各自的tab标签进行特定的设置,这个插件的默认设置已经算是最佳的一个设置了,所以不需要做太多的修改即可。</p> <h3 id="descriptions" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">1.3 优化你的描述description</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">现在我们优化好了页面标题,接下来我们要关注于页面的meta descriptions了,当然目前最新的搜索引擎算法已经不再把网页meta的keywords和descriptions作为很重要的权重指标了,但是设置合适的descriptions,将给予访客对你网站一个良好的印象,因为你设置的descriptions将会优先显示在搜索引擎的描述里边。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">有关这块的优化,SEO Ultimate同样做得很优秀,简单截图显示如下:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/6c469ff4bfc94b058edeec7c92b5c0d4.jpg" target="_blank"><img class="aligncenter size-full wp-image-4817 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/6c469ff4bfc94b058edeec7c92b5c0d4.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第11张图片" width="565" height="289" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;;border:1px solid black;"></a></p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">如截图所示,该插件默认的设置已经就可以了,正如上边所说的那样,基于网页meta的keywords和descriptions已经远没有几年前那么重要的考虑,也不建议花太多的心思去优化,尤其过度的堆砌关键词会适得其反。</p> <h3 id="images" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">1.4 图片优化</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">众所周知,你的给每张图片尽可能的配上好的标题和alt标签,但是一旦图片非常多的时候,处理类似的工作将变得非常的耗时而且低效,这里向大家推荐一款不错的插件:<span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">SEO Friendly Images</span>, 这款插件将自动为你图片匹配上标题和alt标签。</p> <h3 id="xmlsitemaps" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">1.5 XML sitemaps提交</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">XML sitemaps提交是为了告诉Google和别的搜索引擎你的网站有了任何新的内容,类似的功能同样向大家推荐一款很不错的插件:BWP Google XML Sitemaps 这个插件设置和使用非常简单,设置好以后会生成一个 这样格式的sitemap地址,然后将这个地址提交给Google Webmaster tools:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/a62b01cb1c1541b1966bb6db71f75967.jpg" target="_blank"><img class="aligncenter size-full wp-image-4819 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/a62b01cb1c1541b1966bb6db71f75967.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第12张图片" width="580" height="570" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;;border:1px solid black;"></a></p> <h2 id="template" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">2 模版优化</h2> <h3 id="bread-crumbs" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">2.1 Breadcrumbs面包屑设置</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">你需要给详情的文章或者页面设置面包屑导航,面包屑导航的格式一般是这样的:“Home > Articles > WordPress SEO” ,设置面包屑导航的好处如下:</p> <ul style="box-sizing: border-box; margin-top: 0px; margin-bottom: 10px;"> <li style="box-sizing: border-box;">它使得访客很容易的访问你网站的每个层次结构的页面,用户体验得到很大的提升;</li> <li style="box-sizing: border-box; margin-bottom: 0px;">它同时也使得搜索引擎很容易的识别出你网站的结构,并且在Google的搜索结果里边,设置了面包屑的网址将会显示出具体的网址格式替代单一的当前网址:<br style="box-sizing: border-box;"><a href="http://img.e-com-net.com/image/info8/30c0a7974074405f8650c24836e0134c.jpg" target="_blank"><img class="aligncenter size-full wp-image-4820 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/30c0a7974074405f8650c24836e0134c.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第13张图片" width="522" height="131" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;;border:1px solid black;"></a></li> </ul> <h3 id="headings" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">2.2 H1 H2 H3 H4等的使用</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">尽管几乎所有的模版都正确使用了H标签,请确保你的文章标题为<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);"><h1></code>,而不是其他任何标签,网站首页你的博客名称也必须是<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);"><h1></code>,同时在在详情页面和类别列表页面,不得出现超过一个的<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);"><h3></code>,侧边栏不得出现<code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; background-color: rgb(249, 242, 244);"><h2></code> 和 <code style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12.6px; padding: 2px 4px; color: rgb(199, 37, 78); border-radius: 4px; margin-bottom: 0px; background-color: rgb(249, 242, 244);"><h3></code>。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">做以上修改对于模版文件的编辑来说非常容易实现,想了解为什么合适的H标签使用会如此重要,请参考这篇文章:<span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">Semantic HTML and SEO</span>。</p> <h3 id="codeclean" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">2.3 优化你的代码</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">所有模版需要用到的javascript和css文件,请存储到特定的外部文件里边,以确保模版文件干净整洁,同时可以确保访客可以初次访问网页的时候缓存这些文件,搜索引擎不需要经常性的索引这些内容。</p> <h3 id="speed" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">2.4 网页载入速度指标</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">搜索引擎每天能抓取你网站多少个页面的一个重要因素,就是你网站的速度是否够快,你可以通过以下三种方式来加快你的网站载入速度:</p> <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 10px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">优化你的模版文件读取数据库的频率到最低,也就是减少读取数据库的查询次数;</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">安装一个缓存插件,我重点推荐W3 Total Cache,尽管这个插件设置相对来说有一点复杂,但是的确可以很有效的提升你站点的整体performance;</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">W3 Total Cache 如果搭配 CDN 比如 MaxCDN将会获得更好的效果。</li> </ol> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">当然页面载入速度另外一个非常重要的因素还是服务器的性能,一款性能不错的服务器将会非常有效的提升你网站的整体性能,这里我们向你推荐专为WordPress优化过的东方数据WordPress主机</p> <h3 id="sidebarthink" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">2.5 重新设计你的侧边栏</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">你真的需要让你的网站侧边栏放满了外部链接吗?Google最近极大的放低了类似外链给你朋友网站带来的效果,因此类似链接的防止对于你朋友网站效果极小,不如重新考虑设计一下,仅仅在首页放置与别人交换的友情链接,而不是所有内页的侧边栏。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">同样对于搜索引擎来看,在文章的详情页面侧边栏放置太多跟本文无关的内容势必也会误导搜索引擎,导致权重的分散。</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">或许某天WordPress后台将允许你设置多个侧边栏,但是至少现在你得手工去为你的网站设置两个侧边栏,分别用于首页和内页,或者多余两个分别对应详情页面和列表页面等。</p> <h3 id="htmlsitemaps" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">2.6 HTML 网站地图</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">对于一个博客网站来说类似的网站地图可有可无,因为博客本身结构相对来说简单,层次也很清晰,但是对于用WordPress来建设的企业网站则不一样,层次结构相对要复杂很多,针对类似的网站,设计一个整站层级结构的网站地图对于访客和搜索引擎来说都是一个不错的选择。</p> <h3 id="author-highlight" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">2.7 作者高亮</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">何为作者高亮,我给你截图显示一下效果你就很容易理解了:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/ccf2d60fe6534b22b4ab35b8f1eecda7.jpg" target="_blank"><img class="aligncenter size-full wp-image-4828 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/ccf2d60fe6534b22b4ab35b8f1eecda7.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第14张图片" width="559" height="143" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade;;border:1px solid black;"></a><br style="box-sizing: border-box;">上图所示最底下一栏即为作者高亮显示的效果,尤其对于有在Google Plus上开设信息页的站长来说,效果尤其明显,一方面可以增加网站在google搜索栏上的效果丰富性,另外也宣传了自己,一举多得。<br style="box-sizing: border-box; margin-bottom: 0px;">那么如何实现类似的效果呢,同样还是回到了强大的SEO Ultimate插件,通过这个插件可以很轻松的实现类似的效果,当然大家不要误会为本指南是专门为这个插件而写,本人跟这个插件作者素昧平生,仅仅是因为这个插件的确写得很不错,算是免费为这个插件做些推介吧,设置方法截图如下:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/91e67283a2104dc58e37eb10006a62c8.jpg" target="_blank"><img class="aligncenter size-full wp-image-4830 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/91e67283a2104dc58e37eb10006a62c8.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第15张图片" width="568" height="240" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;;border:1px solid black;"></a></p> <h2 id="advancedseo" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">3 高级 WordPress SEO 和重复的内容设置</h2> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">一旦你做好了以上所有这些的基础设置以后,你将开始做一件简单的事情,就是重复内容的设置,WordPress自带了三套内容检索方式:</p> <ol style="box-sizing: border-box; margin-left: -10px; margin-top: 0px; margin-bottom: 10px;"> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">按照日期归档</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none;">按照类别</li> <li style="box-sizing: border-box; line-height: 1.8em; list-style: none; margin-bottom: 0px;">按照标签</li> </ol> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">合理的用好这三套内容检索方式,将会为你网站带来更好的内容结构和更丰富的内链。此处设置较为简单而且主要取决于网站站长对站点内容布局的要求来设置,因此这里不做大篇幅的讲解。</p> <h3 id="disablearchives" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">3.1 屏蔽不需要的归档</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">如果你的博客仅仅是一个作者写的所有文章,那么就没有必要保留作者的归档。</p> <h3 id="pagination" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">3.2 设置好的分页</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">当搜索引擎抓取到一个类别列表页面的时候,如果如果没有设置好的分页格式,势必得跳跃几十个页面才能回到此类别的第一个页面,因此良好的分页格式变得很为重要,实现分页的插件很多,我们推荐这款WP-PageNavi。</p> <h3 id="nofollowmeta" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">3.3 不跟随无关的链接</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">另外一个提升WordPress SEO效果的技巧就是停止跟随任何登陆和注册页面。</p> <h3 id="canonical" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">3.4 Canonical</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">Canonical即为页面链接的唯一性,设置了Canonical属性以后,将告诉搜索引擎,该页面的唯一URL,这样避免因为URL的多种格式造成权重的分散,SEO Ultimate插件对于这个属性有直接的解决方案,截图如下:</p> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;"><a href="http://img.e-com-net.com/image/info8/d351933258344382bc526e0e734960ab.jpg" target="_blank"><img class="aligncenter size-full wp-image-4834 uk-scrollspy-inview uk-animation-fade" src="http://img.e-com-net.com/image/info8/d351933258344382bc526e0e734960ab.jpg" alt="WordPress SEO ☞ WordPress网站终极优化指南_第16张图片" width="571" height="216" style="box-sizing: border-box; border: 0px; transition: opacity 1s linear 0s; vertical-align: middle; max-width: 100%; height: auto !important; display: block; margin-left: auto; margin-right: auto; animation-duration: 0.8s; animation-timing-function: linear !important; animation-fill-mode: both; animation-name: uk-fade; margin-bottom: 0px;;border:1px solid black;"></a></p> <h2 id="structure" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">4 良好的网站结构有利于提高排名</h2> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">博客因为先天具备的良好的站点结构等因素很有利于搜索引擎的索引和收录,当然也得取决于你是否很好的利用起来:</p> <h3 id="pagesvsposts" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">4.1 页面取代文章</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">你应该注意到了,你正在看的这篇文章并不是一篇post而是一篇page,为什么呢?首先,这篇指南的网址格式需要是直接继承在网站首页域名后边,中间不想让他带任何的其他格式,比如category或者tag之类的,再者为了体现WordPress SEO这个关键词的密度,用页面来编辑有先天的优势,方便随时编辑更新。</p> <h3 id="newwine" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">4.2 旧瓶装新酒</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">如果一篇文章在搜索引擎上某些关键词取得了较高的排名,你可以做一下操作来获得更好的效果:</p> <ul style="box-sizing: border-box; margin-top: 0px; margin-bottom: 10px;"> <li style="box-sizing: border-box;">新建一个<span style="box-sizing: border-box; font-weight: 700; margin-bottom: 0px;">页面</span>重新编辑更好的内容和关键词密度;</li> <li style="box-sizing: border-box;">修改旧的这篇文章的slug为另外一个网址,方便新建页面;</li> <li style="box-sizing: border-box;">发布你的新页面地址为这篇文章的地址,如何通过页面的固定链接构造出这篇文章的网址相信不是很难的事情;</li> <li style="box-sizing: border-box;">发送一封邮件给所有跟随了你这篇文章的用户,说明你已经更新了这篇文章;</li> <li style="box-sizing: border-box; margin-bottom: 0px;">等待这篇文章再次被搜索引擎索引更新;</li> </ul> <h3 id="relatedposts" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">4.3 链接到相关文章</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">让搜索引擎更容易通过当前文章索引到旧的同类别的文章的方式,就是添加相关文章插件,在此推荐这款不错的插件Yet Another Related Posts Plugin或者自己通过自定义模版PHP代码也不难实现类似的功能。</p> <h2 id="comment-optimization" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 30px;">5 评论优化</h2> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">网站的评论功能是网站内容交互性上的一个很好的体现,尤其对于一些不错的原创文章,获得大量有意义的评论,一定程度上也相当于当前页面有了定期的内容更新,有关评论优化这块我想简单分两种方式来说明:</p> <h3 id="comment-microdata" style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 20px; margin-bottom: 10px; font-size: 24px;">5.1 评分微数据 Rating 和 AggregateRating 的使用</h3> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">提示:以下文字为了方便说明,部分引用了国内不错的WordPress SEO作者 mg12 的教程<span class="removed_link" style="box-sizing: border-box; text-decoration: line-through;">评分微数据 Rating 和 AggregateRating 的使用方法</span>,在此对他表示感谢,当然如果有涉及侵权等,请来信告知,我将第一时间处理。<br style="box-sizing: border-box;">评分也叫星评, 多在文章, 商品等有主体信息的网页中使用. 虽然 <span class="removed_link" style="box-sizing: border-box; text-decoration: line-through;">schema.org</span> 上对 <span style="box-sizing: border-box; font-weight: 700;"><span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">Rating</span></span> 和 <span style="box-sizing: border-box; font-weight: 700;"><span class="removed_link" style="box-sizing: border-box; text-decoration: line-through; margin-bottom: 0px;">AggregateRating </span></span>及其使用方法有详细的说明, 但有些地方不注意容易搞错。<br style="box-sizing: border-box; margin-bottom: 0px;">Rating 指的是某一次评分, 可能只有一个数值 (ratingValue), 表示此次评分的分数.</p> <h4 style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">微数据 Rating</h4> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">AggregateRating 是评分汇总, 除了评分数值, 至少还应该包含评分的数量 (ratingCount 或者 reviewCount), 表示这个分数是多少次评分的平均值.</p> <h4 style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">微数据 AggregateRating</h4> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">在搜索结果中, AggregateRating 可能会被显示, 但 Rating 不会. 很做网站做了 AggregateRating 忽略 Rating, 可能是因为这个原因, 包括 Google Play 平台.</p> <h4 style="box-sizing: border-box; font-weight: 500; font-family: inherit; line-height: 1.1; color: inherit; margin-top: 10px; margin-bottom: 10px; font-size: 18px;">ratingCount 和 reviewCount 的区别</h4> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">上一段提到 AggregateRating 中的评分数量 ratingCount 和 reviewCount, 两者都表明数量, 但意义不一样.<br style="box-sizing: border-box;">我希望博客的读者可以为文章进行评价, 而这些读者可以不对文章进行评论和回复, 所以使用了 ratingCount, 这表明获得的票数. 在 Google 搜索结果中显示如下.<br style="box-sizing: border-box;">基于上述对于微数据的解释文档,并参考 mg12 的方式,成功改造了 WP-PostRatings 插件,完美实现了网站页面在Google引擎上的评分的显示。<br style="box-sizing: border-box;">Google结构化数据测试工具地址:<br style="box-sizing: border-box;">事实上对于WP-PostRatings的改造并不算很大,主要是配合WP模版的改造,简单说明如下:<br style="box-sizing: border-box; margin-bottom: 0px;">编辑/wp-content/plugins/wp-postratings/wp-postratings.php 文件,找到第83行的代码:</p> <div id="crayon-5710a3d76a675676576942" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="box-sizing: border-box; width: 850px; padding: 0px; margin: 12px auto; font-family: Monaco, MonacoRegular, 'Courier New', monospace; float: none; height: auto; overflow: hidden !important; position: relative !important; direction: ltr !important; border: 1px solid rgb(153, 153, 153) !important; text-shadow: none !important; font-size: 12px !important; line-height: 15px !important; background: rgb(253, 253, 253) !important;"> <div class="crayon-plain-wrap" style="box-sizing: border-box; border: 0px; padding: 0px !important; margin: 0px !important; height: auto !important; background: 0px 50%;"> </div> <div class="crayon-main" style="border:0px; padding:0px; margin:0px; width:848px; overflow:auto; max-height:500px; position:relative; z-index:1; background:0px 50%"> <table class="crayon-table" style="font-size:12px; margin-bottom:0px; margin-left:0px; width:auto!important; border-spacing:0px!important; border-collapse:collapse!important; border:none!important; padding:0px!important; margin-right:0px!important; margin-top:0px!important; table-layout:auto!important; background:none!important"> <tbody style="margin-bottom:0px"> <tr class="crayon-row" style="margin:0px!important; padding:0px!important; border:none!important; vertical-align:top!important; background:0px 50%"> <td class="crayon-nums " style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; color:rgb(84,153,222)!important; background:rgb(223,239,255)!important"> <div class="crayon-nums-content" style="border:0px; padding:0px; margin:0px; white-space:nowrap; line-height:15px!important; background:0px 50%"> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:30px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 1 </div> </div> </td> <td class="crayon-code" style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; width:830px; background:0px 50%"> <div class="crayon-pre" style="padding:0px; margin:0px; white-space:pre; overflow:visible; border:none!important; line-height:15px!important; background:none!important"> <div class="crayon-line" id="crayon-5710a3d76a675676576942-1" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">$</span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">attributes</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">'id="post-ratings-'</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">.</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">$</span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">ratings_id</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">.</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">'" class="post-ratings" itemscope itemtype="http://schema.org/Product"'</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(51,51,51)!important">;</span> </div> </div> </td> </tr> </tbody> </table> </div> </div> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">替换为:</p> <div id="crayon-5710a3d76a67f650488941" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="width:850px; padding:0px; margin:12px auto; font-family:Monaco,MonacoRegular,'Courier New',monospace; float:none; height:auto; overflow:hidden!important; position:relative!important; direction:ltr!important; border:1px solid rgb(153,153,153)!important; font-size:12px!important; line-height:15px!important; background:rgb(253,253,253)!important"> <div class="crayon-plain-wrap" style="border:0px; padding:0px!important; margin:0px!important; height:auto!important; background:0px 50%"> </div> <div class="crayon-main" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; width: 848px; overflow: auto; max-height: 500px; position: relative; z-index: 1; background: 0px 50%;"> <table class="crayon-table" style="box-sizing: border-box; font-size: 12px; margin-bottom: 0px; margin-left: 0px; width: auto !important; border-spacing: 0px !important; border-collapse: collapse !important; border: none !important; padding: 0px !important; margin-right: 0px !important; margin-top: 0px !important; table-layout: auto !important; background: none !important;"> <tbody style="box-sizing: border-box; margin-bottom: 0px;"> <tr class="crayon-row" style="box-sizing: border-box; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important; background: 0px 50%;"> <td class="crayon-nums " style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; color: rgb(84, 153, 222) !important; background: rgb(223, 239, 255) !important;"> <div class="crayon-nums-content" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 15px !important; background: 0px 50%;"> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 30px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 1 </div> </div></td> <td class="crayon-code" style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; width: 830px; background: 0px 50%;"> <div class="crayon-pre" style="box-sizing: border-box; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; border: none !important; line-height: 15px !important; background: none !important;"> <div class="crayon-line" id="crayon-5710a3d76a67f650488941-1" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">$</span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">attributes</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">'id="post-ratings-'</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">$</span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">ratings_id</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(51, 51, 51) !important;">.</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">'" class="post-ratings" itemscope itemtype="http://schema.org/AggregateRating"'</span> <span class="crayon-sy" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(51, 51, 51) !important;">;</span> </div> </div></td> </tr> </tbody> </table> </div> </div> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">接下来就是对模版的改造了,简单说明以下:<br style="box-sizing: border-box; margin-bottom: 0px;">首先找到模版头部header.php,</p> <div id="crayon-5710a3d76a684837611566" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="box-sizing: border-box; width: 850px; padding: 0px; margin: 12px auto; font-family: Monaco, MonacoRegular, 'Courier New', monospace; float: none; height: auto; overflow: hidden !important; position: relative !important; direction: ltr !important; border: 1px solid rgb(153, 153, 153) !important; text-shadow: none !important; font-size: 12px !important; line-height: 15px !important; background: rgb(253, 253, 253) !important;"> <div class="crayon-plain-wrap" style="box-sizing: border-box; border: 0px; padding: 0px !important; margin: 0px !important; height: auto !important; background: 0px 50%;"> </div> <div class="crayon-main" style="border:0px; padding:0px; margin:0px; width:848px; overflow:auto; max-height:500px; position:relative; z-index:1; background:0px 50%"> <table class="crayon-table" style="font-size:12px; margin-bottom:0px; margin-left:0px; width:auto!important; border-spacing:0px!important; border-collapse:collapse!important; border:none!important; padding:0px!important; margin-right:0px!important; margin-top:0px!important; table-layout:auto!important; background:none!important"> <tbody style="margin-bottom:0px"> <tr class="crayon-row" style="margin:0px!important; padding:0px!important; border:none!important; vertical-align:top!important; background:0px 50%"> <td class="crayon-nums " style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; color:rgb(84,153,222)!important; background:rgb(223,239,255)!important"> <div class="crayon-nums-content" style="border:0px; padding:0px; margin:0px; white-space:nowrap; line-height:15px!important; background:0px 50%"> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 1 </div> </div> </td> <td class="crayon-code" style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; width:830px; background:0px 50%"> <div class="crayon-pre" style="padding:0px; margin:0px; white-space:pre; overflow:visible; border:none!important; line-height:15px!important; background:none!important"> <div class="crayon-line" id="crayon-5710a3d76a684837611566-1" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-v" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,45,122)!important">body</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> </div> </td> </tr> </tbody> </table> </div> </div> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">替换为</p> <div id="crayon-5710a3d76a68a717815014" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="width:850px; padding:0px; margin:12px auto; font-family:Monaco,MonacoRegular,'Courier New',monospace; float:none; height:auto; overflow:hidden!important; position:relative!important; direction:ltr!important; border:1px solid rgb(153,153,153)!important; font-size:12px!important; line-height:15px!important; background:rgb(253,253,253)!important"> <div class="crayon-plain-wrap" style="border:0px; padding:0px!important; margin:0px!important; height:auto!important; background:0px 50%"> </div> <div class="crayon-main" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; width: 848px; overflow: auto; max-height: 500px; position: relative; z-index: 1; background: 0px 50%;"> <table class="crayon-table" style="box-sizing: border-box; font-size: 12px; margin-bottom: 0px; margin-left: 0px; width: auto !important; border-spacing: 0px !important; border-collapse: collapse !important; border: none !important; padding: 0px !important; margin-right: 0px !important; margin-top: 0px !important; table-layout: auto !important; background: none !important;"> <tbody style="box-sizing: border-box; margin-bottom: 0px;"> <tr class="crayon-row" style="box-sizing: border-box; margin: 0px !important; padding: 0px !important; border: none !important; vertical-align: top !important; background: 0px 50%;"> <td class="crayon-nums " style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; color: rgb(84, 153, 222) !important; background: rgb(223, 239, 255) !important;"> <div class="crayon-nums-content" style="box-sizing: border-box; border: 0px; padding: 0px; margin: 0px; white-space: nowrap; line-height: 15px !important; background: 0px 50%;"> <div class="crayon-num" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; text-align: center; height: 15px; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; background: 0px 50%;"> 1 </div> </div></td> <td class="crayon-code" style="box-sizing: border-box; padding: 0px !important; vertical-align: top !important; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; border: 0px; margin: 0px !important; width: 830px; background: 0px 50%;"> <div class="crayon-pre" style="box-sizing: border-box; padding: 0px; margin: 0px; white-space: pre; overflow: visible; tab-size: 4; border: none !important; line-height: 15px !important; background: none !important;"> <div class="crayon-line" id="crayon-5710a3d76a68a717815014-1" style="box-sizing: border-box; font-family: inherit; border: 0px; padding: 0px 5px; margin: 0px; height: inherit; word-break: break-all; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; white-space: pre-wrap !important; background: 0px 50%;"> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"><</span> <span class="crayon-e" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 78, 208) !important;">body </span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">itemtype</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">"http://schema.org/WebPage"</span> <span class="crayon-h" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;"> </span> <span class="crayon-v" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 45, 122) !important;">itemscope</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 111, 224) !important;">=</span> <span class="crayon-s" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; color: rgb(0, 128, 0) !important;">""</span> <span class="crayon-o" style="box-sizing: border-box; font-family: inherit; height: inherit; font-size: inherit !important; line-height: inherit !important; font-weight: inherit !important; margin-bottom: 0px; color: rgb(0, 111, 224) !important;">></span> </div> </div></td> </tr> </tbody> </table> </div> </div> <p style="box-sizing: border-box; line-height: 28px; margin-top: 0px; margin-bottom: 10px;">然后找到single.php,进行简单的改造如下:</p> <div id="crayon-5710a3d76a68f868022147" class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate crayon-wrapped" style="box-sizing: border-box; width: 850px; padding: 0px; margin: 12px auto; font-family: Monaco, MonacoRegular, 'Courier New', monospace; float: none; height: auto; overflow: hidden !important; position: relative !important; direction: ltr !important; border: 1px solid rgb(153, 153, 153) !important; text-shadow: none !important; font-size: 12px !important; line-height: 15px !important; background: rgb(253, 253, 253) !important;"> <div class="crayon-plain-wrap" style="box-sizing: border-box; border: 0px; padding: 0px !important; margin: 0px !important; height: auto !important; background: 0px 50%;"> </div> <div class="crayon-main" style="border:0px; padding:0px; margin:0px; width:848px; overflow:auto; max-height:500px; position:relative; z-index:1; background:0px 50%"> <table class="crayon-table" style="font-size:12px; margin-bottom:0px; margin-left:0px; width:auto!important; border-spacing:0px!important; border-collapse:collapse!important; border:none!important; padding:0px!important; margin-right:0px!important; margin-top:0px!important; table-layout:auto!important; background:none!important"> <tbody style="margin-bottom:0px"> <tr class="crayon-row" style="margin:0px!important; padding:0px!important; border:none!important; vertical-align:top!important; background:0px 50%"> <td class="crayon-nums " style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; color:rgb(84,153,222)!important; background:rgb(223,239,255)!important"> <div class="crayon-nums-content" style="border:0px; padding:0px; margin:0px; white-space:nowrap; line-height:15px!important; background:0px 50%"> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 1 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 2 </div> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 3 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 4 </div> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 5 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 6 </div> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 7 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 8 </div> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 9 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 10 </div> <div class="crayon-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; background:0px 50%"> 11 </div> <div class="crayon-num crayon-striped-num" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; text-align:center; height:15px; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(49,124,197)!important; background:rgb(200,225,250)!important"> 12 </div> </div> </td> <td class="crayon-code" style="padding:0px!important; vertical-align:top!important; font-family:Monaco,MonacoRegular,'Courier New',monospace!important; border:0px; margin:0px!important; width:823px; background:0px 50%"> <div class="crayon-pre" style="padding:0px; margin:0px; white-space:pre; overflow:visible; border:none!important; line-height:15px!important; background:none!important"> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-1" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">article </span> <span class="crayon-t" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(128,0,128)!important">class</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">"thepost"</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">itemtype</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">"http://schema.org/Article"</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">itemscope</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">""</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-2" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important"> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">    </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">fieldset</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-3" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">    </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">legend</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">></span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">h1 </span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">itemprop</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">"name"</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">></span> <span class="crayon-ta" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(255,0,0)!important"><?php</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">the_title</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">(</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">)</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">;</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-ta" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(255,0,0)!important">?></span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">h1</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">></span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">legend</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-4" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important"> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">    </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">article </span> <span class="crayon-t" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(128,0,128)!important">class</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">"single-content"</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-5" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-ta" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(255,0,0)!important"><?php</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-st" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(128,0,128)!important">if</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">(</span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">function_exists</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">(</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">'the_ratings'</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">)</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">)</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">{</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">the_ratings</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">(</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">)</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">;</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">}</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-ta" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(255,0,0)!important">?></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-6" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important">   </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-7" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">    </span> <span class="crayon-ta" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(255,0,0)!important"><?php</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">the_content</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">(</span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">__</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">(</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">'<img src="/images/more.jpg" alt="more" border="0" />'</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">)</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">)</span> <span class="crayon-sy" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(51,51,51)!important">;</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-ta" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(255,0,0)!important">?></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-8" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important"> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">br</span> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"> </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-9" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-e" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,78,208)!important">div </span> <span class="crayon-t" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(128,0,128)!important">class</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">=</span> <span class="crayon-s" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,128,0)!important">"clear"</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">></span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">div</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-10" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important"> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">    </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">article</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line" id="crayon-5710a3d76a68f868022147-11" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:0px 50%"> <span class="crayon-h" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">    </span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">fieldset</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> <div class="crayon-line crayon-striped-line" id="crayon-5710a3d76a68f868022147-12" style="font-family:inherit; border:0px; padding:0px 5px; margin:0px; height:inherit; word-break:break-all; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; white-space:pre-wrap!important; background:rgb(247,247,247)!important"> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important"><</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; color:rgb(0,111,224)!important">/</span> <span class="crayon-i" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important">article</span> <span class="crayon-o" style="font-family:inherit; height:inherit; font-size:inherit!important; line-height:inherit!important; font-weight:inherit!important; margin-bottom:0px; color:rgb(0,111,224)!important">></span> </div> </div> </td> </tr> </tbody> </table> </div> </div> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">至此改造完成以后,你再对当前文章进行以下评分,然后通过Google结构化数据测试工具测试一下看看,见证奇迹的时刻终于到了,你会看到你的网址在Google上显示的效果多了一行亮眼的黄色评分记录,是否很有成就感,当然这个评分记录并不会直接影响你网站关键词的排名,但是你不觉得多了一条如此亮眼的黄色评分记录给你网站增色不少吗,至少多了更多访客点击进来的吸引力,侧面提升了网站的流量。</p> <h3 id="comment-social" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:24px"> 5.2 评论社会化平台扩展</h3> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">有关评论社会化平台的扩展方案,相信很多网站都已经启用了,其中做得不错的,国外的当推Disqus Comment System,国内的就很多了,个人推荐多说社会化评论系统,速度较快,界面干净整洁,想安装的自己去搜索一下即可。</p> <h2 id="measure" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:30px"> 6 测试SEO优化效果</h2> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">一个好的WordPress SEO方案不仅仅需要良好的执行各种优化方法,同时还得通过专业的工具测试具体优化效果,推荐非常不错的测试工具<span class="removed_link" style="text-decoration:line-through; margin-bottom:0px">Google Analytics</span>。</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">另外一款极力推荐的工具就是这篇指南前面篇幅里边提到过的<span class="removed_link" style="text-decoration:line-through; margin-bottom:0px">Google Webmaster Tools</span>。</p> <h2 id="conclusion" style="font-weight:500; font-family:inherit; line-height:1.1; color:inherit; margin-top:20px; margin-bottom:10px; font-size:30px"> 7 WordPress SEO总结</h2> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">花了整整一下午的时间来写这篇WordPress SEO指南,脑细胞死了不少,但也收获颇丰,至少证明自己还是有耐心专注的做好一件事情的,现在的社会太过于浮躁,适当找机会让自己安静的做好一件事情,你会发现有意想不到的收获,离题了,回归本文主旨,有关SEO优化向来就是一项极大极其复杂的工程,绝非短期内突击一下就可以取得良好效果的,需要持之以恒的耐心和决心,还要耐得住寂寞,因为这个过程往往非常的枯燥乏味。</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">好了本文到此先收尾了,当然还会做持续的更新,大家看完有任何想法请不吝赐教!</p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px"><span style="margin-bottom:0px; text-decoration:underline"><span style="margin-bottom:0px; color:rgb(255,0,0)">最新更新提示:经本站反复测试,本教程提到的 SEO Ultimate 插件有一定的漏洞和不足,现统一建议更换为更强大的 WordPress SEO by Yoast ,这款插件是目前评测下来最佳的WordPress 免费seo插件,大家可以安装测试一下,设置也很简单,另外如果根据本教程安装了 SEO Ultimate 的,请安装 <span style="margin-bottom:0px; color:rgb(255,0,0)">SEO Data Transporter</span> 这款插件,然后根据这款插件的操作流程可以很轻松的实现从 SEO Ultimate 到 WordPress SEO by Yoast 的迁移。</span></span></p> <p style="line-height:28px; margin-top:0px; margin-bottom:10px">另外也顺便做个广告,如有意找我们团队做WordPress SEO的朋友,请点击以下右侧索取报价按钮,填写一份简单的表单提交给我们即可,谢谢大家!</p> </div> </div> <div></div> </div> </div> </div> </div> </div> </div> <!--PC和WAP自适应版--> <div id="SOHUCS" sid="1290590860764848128"></div> <script type="text/javascript" src="/views/front/js/chanyan.js"></script> <!-- 文章页-底部 动态广告位 --> <div class="youdao-fixed-ad" id="detail_ad_bottom"></div> </div> <div class="col-md-3"> <div class="row" id="ad"> <!-- 文章页-右侧1 动态广告位 --> <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_1"> </div> </div> <!-- 文章页-右侧2 动态广告位 --> <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_2"></div> </div> <!-- 文章页-右侧3 动态广告位 --> <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_3"></div> </div> </div> </div> </div> </div> </div> <div class="container"> <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(wordpress)</h4> <div id="paradigm-article-related"> <div class="recommend-post mb30"> <ul class="widget-links"> <li><a href="/article/1835434126874865664.htm" title="ubuntu安装wordpress" target="_blank">ubuntu安装wordpress</a> <span class="text-muted">lissettecarlr</span> <div>1安装nginx网上安装方式很多,这就就直接用apt-get了apt-getinstallnginx不用启动啥,然后直接在浏览器里面输入IP:80就能看到nginx的主页了。如果修改了一些配置可以使用下列命令重启一下systemctlrestartnginx.service2安装mysql输入安装前也可以更新一下软件源,在安装过程中将会让你输入数据库的密码。sudoapt-getinstallmy</div> </li> <li><a href="/article/1834989767712927744.htm" title="【漏洞分享】2018年-2024年HVV 6000+个漏洞 POC 合集分享" target="_blank">【漏洞分享】2018年-2024年HVV 6000+个漏洞 POC 合集分享</a> <span class="text-muted">漏洞文库-Web安全</span> <a class="tag" taget="_blank" href="/search/%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/1.htm">漏洞复现</a><a class="tag" taget="_blank" href="/search/web%E5%AE%89%E5%85%A8/1.htm">web安全</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%AE%89%E5%85%A8/1.htm">安全</a><a class="tag" taget="_blank" href="/search/%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7/1.htm">测试工具</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8/1.htm">网络安全</a> <div>此份poc集成了Zabbix、用友、通达、Wordpress、Thinkcmf、Weblogic、Tomcat等下载链接:链接:https://pan.quark.cn/s/1cd7d8607b8a</div> </li> <li><a href="/article/1834967570235617280.htm" title="【漏洞利用】2018年-2024年HVV 6000+个漏洞 POC 合集分享" target="_blank">【漏洞利用】2018年-2024年HVV 6000+个漏洞 POC 合集分享</a> <span class="text-muted">baiolkdnhjaio</span> <a class="tag" taget="_blank" href="/search/%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/1.htm">漏洞复现</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8/1.htm">网络安全</a><a class="tag" taget="_blank" href="/search/web%E5%AE%89%E5%85%A8/1.htm">web安全</a><a class="tag" taget="_blank" href="/search/%E5%AE%89%E5%85%A8/1.htm">安全</a> <div>此份poc集成了Zabbix、用友、通达、Wordpress、Thinkcmf、Weblogic、Tomcat等下载链接:链接:https://pan.quark.cn/s/1cd7d8607b8a</div> </li> <li><a href="/article/1834825627467870208.htm" title="华纳云:修复WordPress内存耗尽错误的常用方法有哪些?" target="_blank">华纳云:修复WordPress内存耗尽错误的常用方法有哪些?</a> <span class="text-muted">华纳云IDC服务商</span> <a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/WordPress/1.htm">WordPress</a> <div>WordPress内存耗尽错误通常是由于PHP内存限制不足导致的。修复这种错误的方法有多种,以下是几种常用的方法:1.修改wp-config.php文件在WordPress根目录的wp-config.php文件中添加或修改以下代码,增加PHP的内存限制:define('WP_MEMORY_LIMIT','256M');将256M替换为所需的内存值。例如,可以将其设置为128M,256M,512M等</div> </li> <li><a href="/article/1834608731044802560.htm" title="CVE-2020-24186 WordPress评论插件wpDiscuz任意文件上传漏洞" target="_blank">CVE-2020-24186 WordPress评论插件wpDiscuz任意文件上传漏洞</a> <span class="text-muted">sukusec</span> <div>0x00漏洞介绍Wordfence的威胁情报团队在一款名叫wpDiscuz的Wordpress评论插件(wpDiscuz是WordPress功能丰富的评论系统插件,可充实网站评论部分)中发现了一个高危漏洞,此漏洞将允许未经认证的攻击者在目标站点中上传任意文件,从而实现远程代码执行。0x01漏洞环境WordPress的gVectorswpDiscuz插件7.0至7.0.4版本中存在远程代码执行漏洞,</div> </li> <li><a href="/article/1833435770929639424.htm" title="推荐使用:Models——简化WordPress自定义类型的高效工具" target="_blank">推荐使用:Models——简化WordPress自定义类型的高效工具</a> <span class="text-muted">郦祺嫒Amiable</span> <div>推荐使用:Models——简化WordPress自定义类型的高效工具modelsWordPressplugintocreatecustomposttypesandtaxonomiesusingJSON,YAMLorPHPfiles项目地址:https://gitcode.com/gh_mirrors/models7/models在追求灵活和定制化的Web开发道路上,WordPress凭借其强大的社</div> </li> <li><a href="/article/1833379388381556736.htm" title="如何将wordpress网站做成微信小程序(我的第一款微信小程序)" target="_blank">如何将wordpress网站做成微信小程序(我的第一款微信小程序)</a> <span class="text-muted">shuihan198712</span> <div>01作品信息作品名称:Axure技术小站作品类型:微信小程序开发日期:2019-07-25目前状态:刚开始,还在开发,上线时间未知02背景1、之前在做wordpress微信支付时候,偶尔发现了一篇,将wordpress网站做成微信小程序的文章。2、微信小程序这么火3、学习一下,了解下小程序开发的一些知识03准备工作1、个人知识储备:我没有相关的代码经验,之前稍微接触过一点点,零零散散,不足以独立写</div> </li> <li><a href="/article/1833347550384582656.htm" title="WordPress website building technology service providers" target="_blank">WordPress website building technology service providers</a> <span class="text-muted">podoor</span> <a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a><a class="tag" taget="_blank" href="/search/woocommerce/1.htm">woocommerce</a> <div>Top10WordPresswebsitebuildingcompaniesinChina,WordPresswebsitebuildingtechnologyserviceprovidersJianzhanpress.comWordPressThemeJianzhanisaplatformdedicatedtoWordPressthemedevelopment,providingavariety</div> </li> <li><a href="/article/1833261192018227200.htm" title="wordpress做后台的资讯类小程序源码" target="_blank">wordpress做后台的资讯类小程序源码</a> <span class="text-muted">北漂的老猿</span> <a class="tag" taget="_blank" href="/search/%E5%A5%BD%E4%BB%A3%E7%A0%81/1.htm">好代码</a><a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a> <div>WordPress博客系统资讯资源变现下载小程序源码。这个就比较牛逼了,直接用wordpress做后台因为由于微信的新规从2022-11月9号后新上线的小程序将不能获取用户头像和名字了所以微信放需要适配全新的,支持让用户自定义头像和昵称了不然统一返回默认头像和显示(微信用户)另外还有一些新增和优化的地方就不多做介绍了大家自行的去研究探索吧!代码下载</div> </li> <li><a href="/article/1833027871740882944.htm" title="从零开始搭建WordPress个人网站" target="_blank">从零开始搭建WordPress个人网站</a> <span class="text-muted">zhaoolee</span> <div>imageimageimageimageimageimage文字版查看下一篇推送设置轻量应用服务器•初始化轻量应用服务器,设置登录密码比如iamzhaoolee•将域名hk.v2fy.com解析到轻量应用服务器的ip•确认开启轻量应用服务器的80端口,63306端口,待会儿要用ssh登录到服务器#查看路径下载wgethttps://wordpress.org/wordpress-5.3.tar.g</div> </li> <li><a href="/article/1832985059469127680.htm" title="mysql 新增管理员_操作MYSQL数据库给WordPress增加新的管理员账号" target="_blank">mysql 新增管理员_操作MYSQL数据库给WordPress增加新的管理员账号</a> <span class="text-muted">仙剑李逍遥</span> <a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a><a class="tag" taget="_blank" href="/search/%E6%96%B0%E5%A2%9E%E7%AE%A1%E7%90%86%E5%91%98/1.htm">新增管理员</a> <div>网页制作网络技术需要大家共同分享,不能闭门造车,下面是bj-dns文章简介:如何手工给wordpress增加一个管理员帐号。首先,我先设定数据库已经存在了wordpress的表,下面就是操作了。首先我们来到PHPMyAdmin界面。我们主要要操作wp_users和wp_usermeta表。首先操作wp_users表增加一个用户选中wp_users表并且点击界面上的插入按钮(在上面一排操作的中间偏后</div> </li> <li><a href="/article/1832408414924402688.htm" title="WordPress的安装与简单开发教程" target="_blank">WordPress的安装与简单开发教程</a> <span class="text-muted">CopyLower</span> <a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/Wordpress/1.htm">Wordpress</a><a class="tag" taget="_blank" href="/search/php/1.htm">php</a> <div>WordPress是目前世界上最受欢迎的开源内容管理系统(CMS),它以简便易用、扩展性强和庞大的生态系统著称。通过它,你可以轻松构建博客、企业网站、电子商务平台等多种类型的网站。本文将为你介绍WordPress的安装过程,以及如何进行简单的开发。第一部分:WordPress的安装1.1.安装前的准备在安装WordPress之前,你需要准备以下环境:Web服务器:如Apache、Nginx等。PH</div> </li> <li><a href="/article/1832080270346514432.htm" title="推荐开源项目:WP-Player - 强大的WordPress音频与视频播放器" target="_blank">推荐开源项目:WP-Player - 强大的WordPress音频与视频播放器</a> <span class="text-muted">邹澜鹤Gardener</span> <div>推荐开源项目:WP-Player-强大的WordPress音频与视频播放器是一个专为WordPress设计的高效、灵活且功能丰富的多媒体播放器插件。它允许你在博客、新闻网站或其他基于WordPress的内容平台上无缝集成音频和视频内容,提供一流的用户体验。技术分析1.响应式设计WP-Player采用现代Web开发原则,支持响应式布局,无论在桌面、平板还是手机等不同设备上,都能自动调整以适应屏幕大小</div> </li> <li><a href="/article/1832062882276274176.htm" title="通过 Docker 部署 WordPress 服务器" target="_blank">通过 Docker 部署 WordPress 服务器</a> <span class="text-muted">shelby_loo</span> <a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a> <div>今天我们将在阿贝云的免费服务器上进行WordPress的部署测试。阿贝云的免费云服务器配置简直是个宝藏,1核CPU、1GB内存、10GB硬盘和5M带宽,真是不错的免费服务器,适合轻量级应用和学习项目。无论你是开发者还是爱好者,阿贝云都能给你提供一个稳定的环境,帮助你快速上手。Docker和WordPress简介Docker是一个开源平台,允许开发者将应用程序及其依赖打包到一个可移植的容器中。通过容</div> </li> <li><a href="/article/1831588745179131904.htm" title="WordPress自适应美图网站整站打包源码" target="_blank">WordPress自适应美图网站整站打包源码</a> <span class="text-muted">北漂的老猿</span> <a class="tag" taget="_blank" href="/search/%E4%BB%A3%E7%A0%81%E5%90%A7/1.htm">代码吧</a><a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a><a class="tag" taget="_blank" href="/search/ripro/1.htm">ripro</a> <div>直接服务器整站源码+数据库打包了,恢复一下就可以直接投入使用。保证好用易用,无需独立服务器就可以使用。强调一下,我这个和其他地方的不一样、不一样、不一样。具体的看下面的说明。现在网络上同样的资源包都是用的加密带后门的主题,需要安装php加密组件才能使用,同时也有后门。本站这个是全部开源无后门,无需安装加密组件,任意一个支持php的虚拟主机都可以使用了。另外原来的数据库里的图片地址都是写死了url的</div> </li> <li><a href="/article/1831394988940947456.htm" title="2024 WordPress资源展示下载类主题源码开心版" target="_blank">2024 WordPress资源展示下载类主题源码开心版</a> <span class="text-muted">会说源码</span> <a class="tag" taget="_blank" href="/search/%E6%BA%90%E4%BB%A3%E7%A0%81%E7%AE%A1%E7%90%86/1.htm">源代码管理</a> <div>简介:WordPress 资源展示型下载类主题 CeoMax-Pro_v7.6开心版;CeoMax-Pro是一款极致美观强大的WordPress付费资源下载主题,它能满足您所有付费资源下载的业务需求!你的想法与业务不能被主题所限制!CeoMax-Pro强大的功能,在不久的将来它能实现你一切幻想!我们也在为此而不断努力。适用于资源站、下载站、交易站、素材站、源码站、课程站、CMS</div> </li> <li><a href="/article/1830454932680044544.htm" title="WordPress 后台缓存插件:WP Admin Cache提高缓存页面" target="_blank">WordPress 后台缓存插件:WP Admin Cache提高缓存页面</a> <span class="text-muted">818源码资源站</span> <a class="tag" taget="_blank" href="/search/%E6%BA%90%E7%A0%81%E4%B8%8B%E8%BD%BD00818.cn/1.htm">源码下载00818.cn</a><a class="tag" taget="_blank" href="/search/%E6%BA%90%E7%A0%81%E4%B8%8B%E8%BD%BD818%E8%B5%84%E6%BA%90%E7%AB%99/1.htm">源码下载818资源站</a><a class="tag" taget="_blank" href="/search/%E7%BC%93%E5%AD%98/1.htm">缓存</a> <div>使用WordPress建站会安装一些静态缓存插件,比如:WPRocket、CacheEnabler、CometCache、W3TotalCache、WPSuperCache、WPFastestCache、HyperCache等等,这些都用于缓存前端。今天介绍一款专门用于缓存后台的插件:WPAdminCache。启用后,提速效果还是很明显,比如后台所有文章页面秒开。缓存会在更新文章、保存设置、保存小</div> </li> <li><a href="/article/1830381315602608128.htm" title="Puock基于WordPress开发的高颜值的自适应主题 支持白天与黑夜模式v2.8.4" target="_blank">Puock基于WordPress开发的高颜值的自适应主题 支持白天与黑夜模式v2.8.4</a> <span class="text-muted">专业软件系统开发</span> <a class="tag" taget="_blank" href="/search/%E6%BA%90%E7%A0%81%E4%B8%8B%E8%BD%BD/1.htm">源码下载</a><a class="tag" taget="_blank" href="/search/wordpress%E4%B8%BB%E9%A2%98/1.htm">wordpress主题</a> <div>内容目录一、详细介绍二、效果展示1.部分代码2.效果图展示三、学习资料下载一、详细介绍WordPress管理后台中的「外观」-「主题」中点击「添加」,选择Puock的主题包进行上传安装并启用即可。提示:为了防止主题不兼容,请在安装主题前进行数据备份,防止数据字段重复覆盖等情况发生。环境要求WordPress>=6.0,PHP>=7.4主题特性支持白天与暗黑模式全局无刷新加载支持博客、CMS、企业三</div> </li> <li><a href="/article/1830362637813248000.htm" title="如何降级 WordPress 到旧版本" target="_blank">如何降级 WordPress 到旧版本</a> <span class="text-muted">Linux大师</span> <div>|我们都知道,每当WordPress有新本的时候,我们都可以在后台一键更新。但是有些时候,我们的主题或插件可能不兼容新版本的WP,这时候我们如果要降级为之前的旧版本,该怎么操作呢?下面一起来看看。|手动降级1.下载对应的WordPress旧版本下载你目前使用的语言版本(即如果你使用官方中文版,就下载官方中文的旧版本,如果是英文原版,就下载英文旧版本)WordPress官方中文版各版本下载地址:ht</div> </li> <li><a href="/article/1830245188333826048.htm" title="【网络安全】WordPress Uncontrolled Resource Consumption" target="_blank">【网络安全】WordPress Uncontrolled Resource Consumption</a> <span class="text-muted">秋说</span> <a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8/1.htm">网络安全</a><a class="tag" taget="_blank" href="/search/web%E5%AE%89%E5%85%A8/1.htm">web安全</a><a class="tag" taget="_blank" href="/search/%E6%BC%8F%E6%B4%9E%E6%8C%96%E6%8E%98/1.htm">漏洞挖掘</a><a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a> <div>未经许可,不得转载。文章目录WordPresswp-cron.php实战漏洞危害解决措施WordPressWordPress是全球最广泛使用的内容管理系统(CMS),目前约有43%的网站依赖于它。由于其用户友好的界面和丰富的插件功能,WordPress成为了全球最受欢迎的CMS。然而,在使用WordPress的过程中,用户常常忽视一些潜在的配置问题,其中之一就是wp-cron.php文件的设置。w</div> </li> <li><a href="/article/1830164255660404736.htm" title="wordpress跨境电商外贸独立站 常见获取流量方式" target="_blank">wordpress跨境电商外贸独立站 常见获取流量方式</a> <span class="text-muted">podoor</span> <a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a> <div>在建立跨境电商外贸独立站时,获取流量的方法有很多种,以下是一些常见的方法:社交媒体营销:通过发布有吸引力的内容在Facebook、Instagram、Twitter等平台上。电子邮件营销:通过向潜在客户发送定制的电子邮件,包含特别优惠或新产品信息。搜索引擎优化(SEO):提高网站在搜索引擎中的排名,以吸引更多的访问者。付费广告:在GoogleAdWords、FacebookAds或其他广告平台上投</div> </li> <li><a href="/article/1830078294108762112.htm" title="Atlas阿特拉斯wordpress主题" target="_blank">Atlas阿特拉斯wordpress主题</a> <span class="text-muted">podoor</span> <a class="tag" taget="_blank" href="/search/wordpress%E6%A8%A1%E6%9D%BF/1.htm">wordpress模板</a><a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a> <div>Atlas阿特拉斯是一个专为WordPress平台设计的多功能主题,该主题由简站wordpress主题开发,旨在为用户提供一个强大而灵活的工具,以构建各种类型的网站。以下是对Atlas阿特拉斯WordPress主题的简介:Atlas阿特拉斯WordPress主题简介:Atlas阿特拉斯以其创新的设计和强大的功能集,为WordPress用户提供了一个全面的主题解决方案。无论是企业网站、B2C独立站、</div> </li> <li><a href="/article/1830059002625617920.htm" title="wordpress在北美华人中的使用情况分析" target="_blank">wordpress在北美华人中的使用情况分析</a> <span class="text-muted">podoor</span> <a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a> <div>WordPress是一个全球广泛使用的开源内容管理系统(CMS),它以其灵活性、易用性和强大的插件生态系统而闻名。在北美华人社区中,WordPress同样受到许多个人和企业的青睐。以下是对WordPress在北美华人中的使用情况的分析:1.语言和文化适应性WordPress支持多语言,这使得它能够很好地适应北美华人社区的需求。许多华人用户选择使用中文或其他语言来创建和维护他们的网站,WordPre</div> </li> <li><a href="/article/1829791636863938560.htm" title="wordpress网站静态缓存插件之WP-Super-Cache详细安装与配置说明教程" target="_blank">wordpress网站静态缓存插件之WP-Super-Cache详细安装与配置说明教程</a> <span class="text-muted">Alextao_0a86</span> <div>关于WP-Super-Cache教程网上有很多,但大多质量不高无实际作用,今天转载一篇个人认为比较不错的文章。原文地址:http://blog.az009.com/15209.html一、安装插件首先,到wordpress后台插件项中点击安装插件列表里面搜索“WPSuperCache”,第一个即是安装即可。二、详细配置安装好WP-Super-Cache并启用后到Settings选项中进行设置,具体</div> </li> <li><a href="/article/1829057979652075520.htm" title="Ubuntu 24.04部署Wordpress" target="_blank">Ubuntu 24.04部署Wordpress</a> <span class="text-muted">idiot_qi</span> <a class="tag" taget="_blank" href="/search/%E5%85%B6%E4%BB%96%E5%B7%A5%E5%85%B7/1.htm">其他工具</a><a class="tag" taget="_blank" href="/search/ubuntu/1.htm">ubuntu</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a> <div>环境:Ubuntu24.04PHP8.1.2-1ubuntu2.18Nginx/1.18.0(Ubuntu)WordPress6.6.1Mysql8文章目录1.安装php2.配置nginx2.1.安装nginx2.2.配置3.下载wordpress3.1.配置wordpress4.mysql配置wordpress数据库和用户4.1.安装和远程连接4.2.创建wordpress数据库和用户5.访问w</div> </li> <li><a href="/article/1829056844639858688.htm" title="WordPress自定义文件上传路径的方法" target="_blank">WordPress自定义文件上传路径的方法</a> <span class="text-muted">程序小小生</span> <a class="tag" taget="_blank" href="/search/WordPress/1.htm">WordPress</a><a class="tag" taget="_blank" href="/search/WordPress%E4%B8%8A%E4%BC%A0%E8%B7%AF%E5%BE%84/1.htm">WordPress上传路径</a><a class="tag" taget="_blank" href="/search/WordPress%E8%87%AA%E5%AE%9A%E4%B9%89%E8%B7%AF%E5%BE%84/1.htm">WordPress自定义路径</a><a class="tag" taget="_blank" href="/search/WordPress/1.htm">WordPress</a><a class="tag" taget="_blank" href="/search/WordPress%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B/1.htm">WordPress上传文件类型</a><a class="tag" taget="_blank" href="/search/WordPress%E4%B8%8A%E4%BC%A0/1.htm">WordPress上传</a> <div>自WordPress3.5版本开始,隐藏了后台媒体设置页面的“默认上传路径和文件的完整URL地址”选项,可以通过下面的代码将该选项调出来。WordPress自定义文件上传路径的方法。将下面的代码添加到当前主题functions.php文件中,就可以调出该选项:if(get_option('upload_path')=='wp-content/uploads' || get_option('uplo</div> </li> <li><a href="/article/1828858919523545088.htm" title="wordpress图片主题" target="_blank">wordpress图片主题</a> <span class="text-muted">北漂的老猿</span> <a class="tag" taget="_blank" href="/search/%E5%A5%BD%E4%BB%A3%E7%A0%81/1.htm">好代码</a><a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a><a class="tag" taget="_blank" href="/search/%E5%9B%BE%E7%89%87%E4%B8%BB%E9%A2%98/1.htm">图片主题</a> <div>源码介绍原版主题源码是一款仿d音模式套图SEO源码,wordpress图片主题不送数据,此源码为wordpress模板,需先安装wordpress后才能使用!!注意:PHP版本越高越好,PHP必须安装SG11扩展代码下载</div> </li> <li><a href="/article/1828344474858778624.htm" title="Kubernetes(k8s)中部署WordPress" target="_blank">Kubernetes(k8s)中部署WordPress</a> <span class="text-muted">条纹布鲁斯</span> <a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a> <div>在Kubernetes(k8s)中部署WordPress通常涉及创建一个Deployment来管理WordPress的Pod,以及一个Service来暴露WordPress应用。此外,由于WordPress需要数据库支持,你还需要部署一个MySQL或MariaDB的Pod和Service。以下是一个基本的示例,展示了如何使用YAML文件在Kubernetes中部署WordPress和MySQL。M</div> </li> <li><a href="/article/1827824598012489728.htm" title="WordPress禁止后台自定义功能" target="_blank">WordPress禁止后台自定义功能</a> <span class="text-muted">podoor</span> <a class="tag" taget="_blank" href="/search/WordPress%E6%8A%80%E6%9C%AF/1.htm">WordPress技术</a><a class="tag" taget="_blank" href="/search/wordpress/1.htm">wordpress</a> <div>wordpress后台可以彻底禁止主题的自定义菜单功能,下面这段代码添加到functions.php文件中,后台外观菜单中的”自定义”就会消失不见了。add_filter('map_meta_cap',function($caps,$cap){if($cap=='customize'){return['do_not_allow'];}return$caps;},10,2);小代码解决大问题,你学废</div> </li> <li><a href="/article/1827693195941736448.htm" title="阿里云轻量应用服务器多少钱?2核2G券后402元,2核4G券后574元" target="_blank">阿里云轻量应用服务器多少钱?2核2G券后402元,2核4G券后574元</a> <span class="text-muted">阿里云最新优惠和活动汇总</span> <div>阿里云轻量应用服务器多少钱?购买轻量应用服务器的用户一般都是个人和普通企业级用户,2核2G和2核4G配置的轻量应用服务器既能用于网站搭建,又可以满足学习、搭建应用等场景的需求,目前这款2核2G配置的阿里云轻量应用服务器券后最低报价为402元/年,2核4G券后最低报价为574元。我们都知道,阿里云轻量应用服务器最大的优势是自带WordPress、LAMP、Docker、DevStudio和Node.</div> </li> <li><a href="/article/2.htm" title="Java序列化进阶篇" target="_blank">Java序列化进阶篇</a> <span class="text-muted">g21121</span> <a class="tag" taget="_blank" href="/search/java%E5%BA%8F%E5%88%97%E5%8C%96/1.htm">java序列化</a> <div>        1.transient         类一旦实现了Serializable 接口即被声明为可序列化,然而某些情况下并不是所有的属性都需要序列化,想要人为的去阻止这些属性被序列化,就需要用到transient 关键字。 </div> </li> <li><a href="/article/129.htm" title="escape()、encodeURI()、encodeURIComponent()区别详解 " target="_blank">escape()、encodeURI()、encodeURIComponent()区别详解 </a> <span class="text-muted">aigo</span> <a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a> <div>原文:http://blog.sina.com.cn/s/blog_4586764e0101khi0.html   JavaScript中有三个可以对字符串编码的函数,分别是: escape,encodeURI,encodeURIComponent,相应3个解码函数:,decodeURI,decodeURIComponent 。 下面简单介绍一下它们的区别 1 escape()函</div> </li> <li><a href="/article/256.htm" title="ArcgisEngine实现对地图的放大、缩小和平移" target="_blank">ArcgisEngine实现对地图的放大、缩小和平移</a> <span class="text-muted">Cb123456</span> <a class="tag" taget="_blank" href="/search/%E6%B7%BB%E5%8A%A0%E7%9F%A2%E9%87%8F%E6%95%B0%E6%8D%AE/1.htm">添加矢量数据</a><a class="tag" taget="_blank" href="/search/%E5%AF%B9%E5%9C%B0%E5%9B%BE%E7%9A%84%E6%94%BE%E5%A4%A7%E3%80%81%E7%BC%A9%E5%B0%8F%E5%92%8C%E5%B9%B3%E7%A7%BB/1.htm">对地图的放大、缩小和平移</a><a class="tag" taget="_blank" href="/search/Engine/1.htm">Engine</a> <div>ArcgisEngine实现对地图的放大、缩小和平移:  个人觉得是平移,不过网上的都是漫游,通俗的说就是把一个地图对象从一边拉到另一边而已。就看人说话吧.  具体实现: 一、引入命名空间    using ESRI.ArcGIS.Geometry;    using ESRI.ArcGIS.Controls; 二、代码实现.</div> </li> <li><a href="/article/383.htm" title="Java集合框架概述" target="_blank">Java集合框架概述</a> <span class="text-muted">天子之骄</span> <a class="tag" taget="_blank" href="/search/Java%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E6%A6%82%E8%BF%B0/1.htm">Java集合框架概述</a> <div>   集合框架 集合框架可以理解为一个容器,该容器主要指映射(map)、集合(set)、数组(array)和列表(list)等抽象数据结构。 从本质上来说,Java集合框架的主要组成是用来操作对象的接口。不同接口描述不同的数据类型。   简单介绍:   Collection接口是最基本的接口,它定义了List和Set,List又定义了LinkLi</div> </li> <li><a href="/article/510.htm" title="旗正4.0页面跳转传值问题" target="_blank">旗正4.0页面跳转传值问题</a> <span class="text-muted">何必如此</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/jsp/1.htm">jsp</a> <div>跳转和成功提示 a)        成功字段非空forward 成功字段非空forward,不会弹出成功字段,为jsp转发,页面能超链接传值,传输变量时需要拼接。接拼接方式list.jsp?test="+strweightUnit+"或list.jsp?test="+weightUnit+&qu</div> </li> <li><a href="/article/637.htm" title="全网唯一:移动互联网服务器端开发课程" target="_blank">全网唯一:移动互联网服务器端开发课程</a> <span class="text-muted">cocos2d-x小菜</span> <a class="tag" taget="_blank" href="/search/web%E5%BC%80%E5%8F%91/1.htm">web开发</a><a class="tag" taget="_blank" href="/search/%E7%A7%BB%E5%8A%A8%E5%BC%80%E5%8F%91/1.htm">移动开发</a><a class="tag" taget="_blank" href="/search/%E7%A7%BB%E5%8A%A8%E7%AB%AF%E5%BC%80%E5%8F%91/1.htm">移动端开发</a><a class="tag" taget="_blank" href="/search/%E7%A7%BB%E5%8A%A8%E4%BA%92%E8%81%94/1.htm">移动互联</a><a class="tag" taget="_blank" href="/search/%E7%A8%8B%E5%BA%8F%E5%91%98/1.htm">程序员</a> <div>    移动互联网时代来了!     App市场爆发式增长为Web开发程序员带来新一轮机遇,近两年新增创业者,几乎全部选择了移动互联网项目!传统互联网企业中超过98%的门户网站已经或者正在从单一的网站入口转向PC、手机、Pad、智能电视等多端全平台兼容体系。据统计,AppStore中超过85%的App项目都选择了PHP作为后端程</div> </li> <li><a href="/article/764.htm" title="Log4J通用配置|注意问题 笔记" target="_blank">Log4J通用配置|注意问题 笔记</a> <span class="text-muted">7454103</span> <a class="tag" taget="_blank" href="/search/DAO/1.htm">DAO</a><a class="tag" taget="_blank" href="/search/apache/1.htm">apache</a><a class="tag" taget="_blank" href="/search/tomcat/1.htm">tomcat</a><a class="tag" taget="_blank" href="/search/log4j/1.htm">log4j</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a> <div>关于日志的等级 那些去 百度就知道了! 这几天 要搭个新框架  配置了 日志 记下来 !做个备忘! #这里定义能显示到的最低级别,若定义到INFO级别,则看不到DEBUG级别的信息了~! log4j.rootLogger=INFO,allLog # DAO层 log记录到dao.log 控制台 和 总日志文件 log4j.logger.DAO=INFO,dao,C</div> </li> <li><a href="/article/891.htm" title="SQLServer TCP/IP 连接失败问题 ---SQL Server Configuration Manager" target="_blank">SQLServer TCP/IP 连接失败问题 ---SQL Server Configuration Manager</a> <span class="text-muted">darkranger</span> <a class="tag" taget="_blank" href="/search/sql/1.htm">sql</a><a class="tag" taget="_blank" href="/search/c/1.htm">c</a><a class="tag" taget="_blank" href="/search/windows/1.htm">windows</a><a class="tag" taget="_blank" href="/search/SQL+Server/1.htm">SQL Server</a><a class="tag" taget="_blank" href="/search/XP/1.htm">XP</a> <div>当你安装完之后,连接数据库的时候可能会发现你的TCP/IP 没有启动.. 发现需要启动客户端协议 : TCP/IP  需要打开 SQL Server Configuration Manager... 却发现无法打开 SQL Server Configuration Manager..?? 解决方法:  C:\WINDOWS\system32目录搜索framedyn.</div> </li> <li><a href="/article/1018.htm" title="[置顶] 做有中国特色的程序员" target="_blank">[置顶] 做有中国特色的程序员</a> <span class="text-muted">aijuans</span> <a class="tag" taget="_blank" href="/search/%E7%A8%8B%E5%BA%8F%E5%91%98/1.htm">程序员</a> <div>从出版业说起 网络作品排到靠前的,都不会太难看,一般人不爱看某部作品也是因为不喜欢这个类型,而此人也不会全不喜欢这些网络作品。究其原因,是因为网络作品都是让人先白看的,看的好了才出了头。而纸质作品就不一定了,排行榜靠前的,有好作品,也有垃圾。 许多大牛都是写了博客,后来出了书。这些书也都不次,可能有人让为不好,是因为技术书不像小说,小说在读故事,技术书是在学知识或温习知识,有些技术书读得可</div> </li> <li><a href="/article/1145.htm" title="document.domain 跨域问题" target="_blank">document.domain 跨域问题</a> <span class="text-muted">avords</span> <a class="tag" taget="_blank" href="/search/document/1.htm">document</a> <div>document.domain用来得到当前网页的域名。比如在地址栏里输入:javascript:alert(document.domain); //www.315ta.com我们也可以给document.domain属性赋值,不过是有限制的,你只能赋成当前的域名或者基础域名。比如:javascript:alert(document.domain = "315ta.com"); </div> </li> <li><a href="/article/1272.htm" title="关于管理软件的一些思考" target="_blank">关于管理软件的一些思考</a> <span class="text-muted">houxinyou</span> <a class="tag" taget="_blank" href="/search/%E7%AE%A1%E7%90%86/1.htm">管理</a> <div> 工作好多看年了,一直在做管理软件,不知道是我最开始做的时候产生了一些惯性的思维,还是现在接触的管理软件水平有所下降.换过好多年公司,越来越感觉现在的管理软件做的越来越乱. 在我看来,管理软件不论是以前的结构化编程,还是现在的面向对象编程,不管是CS模式,还是BS模式.模块的划分是很重要的.当然,模块的划分有很多种方式.我只是以我自己的划分方式来说一下. 做为管理软件,就像现在讲究MVC这</div> </li> <li><a href="/article/1399.htm" title="NoSQL数据库之Redis数据库管理(String类型和hash类型)" target="_blank">NoSQL数据库之Redis数据库管理(String类型和hash类型)</a> <span class="text-muted">bijian1013</span> <a class="tag" taget="_blank" href="/search/redis/1.htm">redis</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/NoSQL/1.htm">NoSQL</a> <div>一.Redis的数据类型 1.String类型及操作         String是最简单的类型,一个key对应一个value,string类型是二进制安全的。Redis的string可以包含任何数据,比如jpg图片或者序列化的对象。         Set方法:设置key对应的值为string类型的value </div> </li> <li><a href="/article/1526.htm" title="Tomcat 一些技巧" target="_blank">Tomcat 一些技巧</a> <span class="text-muted">征客丶</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/tomcat/1.htm">tomcat</a><a class="tag" taget="_blank" href="/search/dos/1.htm">dos</a> <div>以下操作都是在windows 环境下 一、Tomcat 启动时配置 JAVA_HOME 在 tomcat 安装目录,bin 文件夹下的 catalina.bat 或 setclasspath.bat 中添加 set JAVA_HOME=JAVA 安装目录 set JRE_HOME=JAVA 安装目录/jre 即可; 二、查看Tomcat 版本 在 tomcat 安装目</div> </li> <li><a href="/article/1653.htm" title="【Spark七十二】Spark的日志配置" target="_blank">【Spark七十二】Spark的日志配置</a> <span class="text-muted">bit1129</span> <a class="tag" taget="_blank" href="/search/spark/1.htm">spark</a> <div>在测试Spark Streaming时,大量的日志显示到控制台,影响了Spark Streaming程序代码的输出结果的查看(代码中通过println将输出打印到控制台上),可以通过修改Spark的日志配置的方式,不让Spark Streaming把它的日志显示在console   在Spark的conf目录下,把log4j.properties.template修改为log4j.p</div> </li> <li><a href="/article/1780.htm" title="Haskell版冒泡排序" target="_blank">Haskell版冒泡排序</a> <span class="text-muted">bookjovi</span> <a class="tag" taget="_blank" href="/search/%E5%86%92%E6%B3%A1%E6%8E%92%E5%BA%8F/1.htm">冒泡排序</a><a class="tag" taget="_blank" href="/search/haskell/1.htm">haskell</a> <div>面试的时候问的比较多的算法题要么是binary search,要么是冒泡排序,真的不想用写C写冒泡排序了,贴上个Haskell版的,思维简单,代码简单,下次谁要是再要我用C写冒泡排序,直接上个haskell版的,让他自己去理解吧。     sort [] = [] sort [x] = [x] sort (x:x1:xs) | x>x1 = x1:so</div> </li> <li><a href="/article/1907.htm" title="java 路径 配置文件读取" target="_blank">java 路径 配置文件读取</a> <span class="text-muted">bro_feng</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a> <div>这几天做一个项目,关于路径做如下笔记,有需要供参考。 取工程内的文件,一般都要用相对路径,这个自然不用多说。 在src统计目录建配置文件目录res,在res中放入配置文件。 读取文件使用方式: 1. MyTest.class.getResourceAsStream("/res/xx.properties") 2. properties.load(MyTest.</div> </li> <li><a href="/article/2034.htm" title="读《研磨设计模式》-代码笔记-简单工厂模式" target="_blank">读《研磨设计模式》-代码笔记-简单工厂模式</a> <span class="text-muted">bylijinnan</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/1.htm">设计模式</a> <div>声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/ package design.pattern; /* * 个人理解:简单工厂模式就是IOC; * 客户端要用到某一对象,本来是由客户创建的,现在改成由工厂创建,客户直接取就好了 */ interface IProduct { </div> </li> <li><a href="/article/2161.htm" title="SVN与JIRA的关联" target="_blank">SVN与JIRA的关联</a> <span class="text-muted">chenyu19891124</span> <a class="tag" taget="_blank" href="/search/SVN/1.htm">SVN</a> <div>SVN与JIRA的关联一直都没能装成功,今天凝聚心思花了一天时间整合好了。下面是自己整理的步骤: 一、搭建好SVN环境,尤其是要把SVN的服务注册成系统服务 二、装好JIRA,自己用是jira-4.3.4破解版 三、下载SVN与JIRA的插件并解压,然后拷贝插件包下lib包里的三个jar,放到Atlassian\JIRA 4.3.4\atlassian-jira\WEB-INF\lib下,再</div> </li> <li><a href="/article/2288.htm" title="JWFDv0.96 最新设计思路" target="_blank">JWFDv0.96 最新设计思路</a> <span class="text-muted">comsci</span> <a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E5%B7%A5%E4%BD%9C/1.htm">工作</a><a class="tag" taget="_blank" href="/search/%E4%BC%81%E4%B8%9A%E5%BA%94%E7%94%A8/1.htm">企业应用</a><a class="tag" taget="_blank" href="/search/%E5%85%AC%E5%91%8A/1.htm">公告</a> <div>                   随着工作流技术的发展,工作流产品的应用范围也不断的在扩展,开始进入了像金融行业(我已经看到国有四大商业银行的工作流产品招标公告了),实时生产控制和其它比较重要的工程领域,而</div> </li> <li><a href="/article/2415.htm" title="vi 保存复制内容格式粘贴" target="_blank">vi 保存复制内容格式粘贴</a> <span class="text-muted">daizj</span> <a class="tag" taget="_blank" href="/search/vi/1.htm">vi</a><a class="tag" taget="_blank" href="/search/%E7%B2%98%E8%B4%B4/1.htm">粘贴</a><a class="tag" taget="_blank" href="/search/%E5%A4%8D%E5%88%B6/1.htm">复制</a><a class="tag" taget="_blank" href="/search/%E4%BF%9D%E5%AD%98%E5%8E%9F%E6%A0%BC%E5%BC%8F/1.htm">保存原格式</a><a class="tag" taget="_blank" href="/search/%E4%B8%8D%E5%8F%98%E5%BD%A2/1.htm">不变形</a> <div>    vi是linux中非常好用的文本编辑工具,功能强大无比,但对于复制带有缩进格式的内容时,粘贴的时候内容错位很严重,不会按照复制时的格式排版,vi能不能在粘贴时,按复制进的格式进行粘贴呢? 答案是肯定的,vi有一个很强大的命令可以实现此功能 。     在命令模式输入:set paste,则进入paste模式,这样再进行粘贴时</div> </li> <li><a href="/article/2542.htm" title="shell脚本运行时报错误:/bin/bash^M: bad interpreter 的解决办法" target="_blank">shell脚本运行时报错误:/bin/bash^M: bad interpreter 的解决办法</a> <span class="text-muted">dongwei_6688</span> <a class="tag" taget="_blank" href="/search/shell%E8%84%9A%E6%9C%AC/1.htm">shell脚本</a> <div>出现原因:windows上写的脚本,直接拷贝到linux系统上运行由于格式不兼容导致 解决办法: 1. 比如文件名为myshell.sh,vim myshell.sh 2. 执行vim中的命令 : set ff?查看文件格式,如果显示fileformat=dos,证明文件格式有问题 3. 执行vim中的命令 :set fileformat=unix 将文件格式改过来就可以了,然后:w</div> </li> <li><a href="/article/2669.htm" title="高一上学期难记忆单词" target="_blank">高一上学期难记忆单词</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/word/1.htm">word</a><a class="tag" taget="_blank" href="/search/english/1.htm">english</a> <div>honest 诚实的;正直的 argue 争论 classical 古典的 hammer 锤子 share  分享;共有 sorrow 悲哀;悲痛 adventure 冒险 error 错误;差错 closet 壁橱;储藏室 pronounce 发音;宣告 repeat 重做;重复 majority 大多数;大半   native 本国的,本地的,本国</div> </li> <li><a href="/article/2923.htm" title="hibernate查询返回DTO对象,DTO封装了多个pojo对象的属性" target="_blank">hibernate查询返回DTO对象,DTO封装了多个pojo对象的属性</a> <span class="text-muted">frankco</span> <a class="tag" taget="_blank" href="/search/POJO/1.htm">POJO</a><a class="tag" taget="_blank" href="/search/hibernate%E6%9F%A5%E8%AF%A2/1.htm">hibernate查询</a><a class="tag" taget="_blank" href="/search/DTO/1.htm">DTO</a> <div>      DTO-数据传输对象;pojo-最纯粹的java对象与数据库中的表一一对应。       简单讲:DTO起到业务数据的传递作用,pojo则与持久层数据库打交道。         有时候我们需要查询返回DTO对象,因为DTO</div> </li> <li><a href="/article/3050.htm" title="Partition List" target="_blank">Partition List</a> <span class="text-muted">hcx2013</span> <a class="tag" taget="_blank" href="/search/partition/1.htm">partition</a> <div>Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of th</div> </li> <li><a href="/article/3177.htm" title="Spring MVC测试框架详解——客户端测试" target="_blank">Spring MVC测试框架详解——客户端测试</a> <span class="text-muted">jinnianshilongnian</span> <div>上一篇《Spring MVC测试框架详解——服务端测试》已经介绍了服务端测试,接下来再看看如果测试Rest客户端,对于客户端测试以前经常使用的方法是启动一个内嵌的jetty/tomcat容器,然后发送真实的请求到相应的控制器;这种方式的缺点就是速度慢;自Spring 3.2开始提供了对RestTemplate的模拟服务器测试方式,也就是说使用RestTemplate测试时无须启动服务器,而是模拟一</div> </li> <li><a href="/article/3304.htm" title="关于推荐个人观点" target="_blank">关于推荐个人观点</a> <span class="text-muted">liyonghui160com</span> <a class="tag" taget="_blank" href="/search/%E6%8E%A8%E8%8D%90%E7%B3%BB%E7%BB%9F/1.htm">推荐系统</a><a class="tag" taget="_blank" href="/search/%E5%85%B3%E4%BA%8E%E6%8E%A8%E8%8D%90%E4%B8%AA%E4%BA%BA%E8%A7%82%E7%82%B9/1.htm">关于推荐个人观点</a> <div>    回想起来,我也做推荐了3年多了,最近公司做了调整招聘了很多算法工程师,以为需要多么高大上的算法才能搭建起来的,从实践中走过来,我只想说【不是这样的】     第一次接触推荐系统是在四年前入职的时候,那时候,机器学习和大数据都是没有的概念,什么大数据处理开源软件根本不存在,我们用多台计算机web程序记录用户行为,用.net的w</div> </li> <li><a href="/article/3431.htm" title="不间断旋转的动画" target="_blank">不间断旋转的动画</a> <span class="text-muted">pangyulei</span> <a class="tag" taget="_blank" href="/search/%E5%8A%A8%E7%94%BB/1.htm">动画</a> <div> CABasicAnimation* rotationAnimation; rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; rotationAnimation.toValue = [NSNumber numberWithFloat: M</div> </li> <li><a href="/article/3558.htm" title="自定义annotation" target="_blank">自定义annotation</a> <span class="text-muted">sha1064616837</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/enum/1.htm">enum</a><a class="tag" taget="_blank" href="/search/annotation/1.htm">annotation</a><a class="tag" taget="_blank" href="/search/reflect/1.htm">reflect</a> <div>对象有的属性在页面上可编辑,有的属性在页面只可读,以前都是我们在页面上写死的,时间一久有时候会混乱,此处通过自定义annotation在类属性中定义。越来越发现Java的Annotation真心很强大,可以帮我们省去很多代码,让代码看上去简洁。 下面这个例子 主要用到了 1.自定义annotation:@interface,以及几个配合着自定义注解使用的几个注解 2.简单的反射 3.枚举 </div> </li> <li><a href="/article/3685.htm" title="Spring 源码" target="_blank">Spring 源码</a> <span class="text-muted">up2pu</span> <a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a> <div>1.Spring源代码 https://github.com/SpringSource/spring-framework/branches/3.2.x 注:兼容svn检出 2.运行脚本 import-into-eclipse.bat 注:需要设置JAVA_HOME为jdk 1.7 build.gradle compileJava { sourceCompatibilit</div> </li> <li><a href="/article/3812.htm" title="利用word分词来计算文本相似度" target="_blank">利用word分词来计算文本相似度</a> <span class="text-muted">yangshangchuan</span> <a class="tag" taget="_blank" href="/search/word/1.htm">word</a><a class="tag" taget="_blank" href="/search/word%E5%88%86%E8%AF%8D/1.htm">word分词</a><a class="tag" taget="_blank" href="/search/%E6%96%87%E6%9C%AC%E7%9B%B8%E4%BC%BC%E5%BA%A6/1.htm">文本相似度</a><a class="tag" taget="_blank" href="/search/%E4%BD%99%E5%BC%A6%E7%9B%B8%E4%BC%BC%E5%BA%A6/1.htm">余弦相似度</a><a class="tag" taget="_blank" href="/search/%E7%AE%80%E5%8D%95%E5%85%B1%E6%9C%89%E8%AF%8D/1.htm">简单共有词</a> <div>word分词提供了多种文本相似度计算方式: 方式一:余弦相似度,通过计算两个向量的夹角余弦值来评估他们的相似度 实现类:org.apdplat.word.analysis.CosineTextSimilarity 用法如下: String text1 = "我爱购物"; String text2 = "我爱读书"; String text3 = </div> </li> </ul> </div> </div> </div> <div> <div class="container"> <div class="indexes"> <strong>按字母分类:</strong> <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a> </div> </div> </div> <footer id="footer" class="mb30 mt30"> <div class="container"> <div class="footBglm"> <a target="_blank" href="/">首页</a> - <a target="_blank" href="/custom/about.htm">关于我们</a> - <a target="_blank" href="/search/Java/1.htm">站内搜索</a> - <a target="_blank" href="/sitemap.txt">Sitemap</a> - <a target="_blank" href="/custom/delete.htm">侵权投诉</a> </div> <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved. <!-- <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>--> </div> </div> </footer> <!-- 代码高亮 --> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script> <link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/> <script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script> </body> </html>