蓝天博客JackyMao 同学在Sino Blog 有留言说到:

据说使用ALL in one SEO 插件的WordPress 博客百度不容易收录,像我的基本收录的都是tag 页,文章页面收录很少。不知道是不是这样的原因?

尔后我又在煎蛋上面看到《赶紧了,抛弃 All in One SEO》这篇文章。

经过一番考虑,我决定就Sino Blog 做个实验,看看在没有使用ALL in one SEO 插件下博客在百度收录情况又会怎么样。

首先,将All in One SEO Pack 这个插件在后台Deactivate 掉,用如下代码取代这个插件:

  1. <?if (is_home()){
  2.     $description = "Sino Blog 原创中文博客,包括互联网、和谐社会、博客心得方面的文章及杂感随谈评论。";
  3.     $keywords = "sino,blog,wordpress,z-blog,theme,蓝兔,博客,主题,下载,上海";
  4. } elseif (is_single()){
  5.     if ($post->post_excerpt) {
  6.         $description     = $post->post_excerpt;
  7.     } else {
  8.         $description = substr(strip_tags($post->post_content),0,220);
  9.     }
  10.  
  11.     $keywords = "";       
  12.     $tags = wp_get_post_tags($post->ID);
  13.     foreach ($tags as $tag ) {
  14.         $keywords = $keywords . $tag->name . ", ";
  15.     }
  16. }
  17. ?>
  18. <?php if ( (is_home()) || (is_single()) ) { ?>
  19. <meta name="description" content="<?=$description?>" />
  20. <meta name="keywords" content="<?=$keywords?>" />
  21. <?php }?>

代码参考来源:我爱水煮鱼

然后,重写标题,将之前的title 部分改为:

  1. <title><?php if (is_home() ) { ?>Sino Blog - 关注互联网与和谐社会的IT评论博客<?php } elseif (is_single()) {?><?php wp_title(''); ?> - Sino Blog<?php } else {?><?php wp_title(''); ?> | Sino Blog<?php } ?></title>

这样写主要是为了保持和以前一样的链接结构以免被搜索引擎惩罚。

那么,收录情况我每天都要跟踪,结果见webmasterhome.cn上的sinoblog.org 百度收录数据

PS:玩博客的乐趣就在于这样不断的捣腾啊 :-)

PS:该文章是2:13 pm 发布的,三个小时(5:11 pm) 之后,我在百度里面查到文章已被收录,Google 暂时还未被收录,如下图:

发件人 images of sinoblog
发件人 images of sinoblog

这或许仅仅是一个巧合?~

Leave a Reply