记录生活 学习SEO优化 | 他日若遂凌云志 敢笑黄巢不丈夫
>>Home > 杂文趣事 > 杂文逸事 > 预告发布:代码生成Wordpress全面SEO信息Keywords,Description,Title

预告发布:代码生成Wordpress全面SEO信息Keywords,Description,Title

Tags: | | 作者:海天无影

前段时间就有朋友问海天的博客的meta信息中的Keywords,Description,Title是怎么得来的,但是前段时间因为忙着弄宿迁学院论坛,再加上原来的代码海天向加上一个简单的判断,所以没时间整理原来使用的代码。昨天晚上海天突然看到留言里又有朋友问的,然后又把代码修改了下,加上了简单的判断,判断是否手动写文章页的Keywords,Description,Title还是自动截取tags和内容的前200字。

其实,这篇文章不是海天想要臭屁的来显摆一下,掉一下大家的胃口。因为代码又不是海天原创的,海天只是修改下的。发布这篇预告文章的主要用途,其实是海天正在调试代码,因为昨天晚上是用的旧文章重新编辑的,所以今天借用这篇预告文章来测试下。呵呵~

这篇代码是海天原来在柳城大哥的博客里看到的代码,话说柳城大哥的博客大家能去转转,很强的一个牛人,做了不少插件呢,海天的博客还用了他的2个插件,呵呵。而且还有一手拍照的好技术,恩,以后要经常请教的,呵呵~

OK,文章既然发布说是预告了,就来简单介绍下代码的作用吧。

Wordpress 不知道为什么,不能单独设置文章页面,分页页面的SEO信息,如不能单独设置页面的Keywords,Description,Title。这点使很多实用Wordpress的朋友很不满意,借助插件的话据说会有些不准确反而适得其反。

所以海天将要发布的这段代码的主动作用,就是给文章页面、分类页面、分页页面单独设置各自的Keywords,Description,Title信息。

还可以自动判断是否手写文章页的Keywords,Description,Title还是自动截取tags和内容的前200字。

额,代码是老的,海天就是加了分页页面的判断和文章页的Keywords,Description,Title信息判断。大家不要急,如果没问题,下一篇文章就送给大家……

日志信息 »

该日志于2010-10-12 14:34由 海天无影 发表在杂文逸事分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下转载到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

15条评论▼点击进行评论


  1. Warning: copy(/home/wwwroot/haitian/blog/avatar/a12eb4e39ba543feb9ff6a105090b952.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    做沙发来了
    哈哈
    我早就用代码了


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 你的代码没有判断~


  2. Warning: copy(/home/wwwroot/haitian/blog/avatar/c4668a51a1479f6c344c7b79636c2236.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    有点烦


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 不烦啊 可以自动判断 到底是手写还是 自动获取啊~
      反正我是喜欢手写的


  3. Warning: copy(/home/wwwroot/haitian/blog/avatar/79a9e817c5e3dfd97ce5bda425a1450f.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    沙发没了,我来了还有什么意思!


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额……来看看我啊…… :lol:


  4. Warning: copy(/home/wwwroot/haitian/blog/avatar/0dcedda7123567217b5ce259e203a209.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    不关心这些,哈哈


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 你的主题已经有了~


  5. Warning: copy(/home/wwwroot/haitian/blog/avatar/ae1d9cb02574d579039efc62a447f2f3.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    你这个有什么独到之处吗?


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 最主要就是 在没有手动设置文章的Keywords,Description的时候
      自动截取文章内容
      其实就是稍稍修改下 加个小判断


  6. Warning: copy(/home/wwwroot/haitian/blog/avatar/1d90a73744b6b1f2131e1d4971dd164f.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    你这个预告可是不怎么样,吊我胃口


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 其实这篇文章只是测试一下
      还有因为海天没的写了 呵呵


  7. Warning: copy(/home/wwwroot/haitian/blog/avatar/b25d8f13fac011afdcece1f40cfacb25.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    发出来有空折腾一下~


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      恩 好的 呵呵


  8. Warning: copy(/home/wwwroot/haitian/blog/avatar/3a6d76790a7f616507cedd378f3cabd4.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复


    预告。。。晕


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额……其实是我没东西写了


  9. Warning: copy(/home/wwwroot/haitian/blog/avatar/8a696fb2b60f79867e39e7803303fc7a.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    哈哈,我以前的meta关键字和描述一直都是空的……


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 怎么看你现在貌似还很空啊 都没Description
      赶快换我的 呵呵 虽然代码貌似很繁琐 但是很方便哈~


  10. Warning: copy(/home/wwwroot/haitian/blog/avatar/d94967b298c3fcfed3f8e5a6c5181f42.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    也开始掉我味口了 :smile:


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 其实 我也没东西写了~
      这篇文章凑数的 呵呵


  11. Warning: copy(/home/wwwroot/haitian/blog/avatar/bf12d703481f992fb051334a04f27c7b.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    对不同的页面设置不同的Keyword和Description这个不错,分类更清晰了~


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      恩 用我的吧 都加了的
      就是代码可能有点繁琐 但是方便的 呵呵


  12. Warning: copy(/home/wwwroot/haitian/blog/avatar/39e15fb57dceeaf6b13d33b10bd74c2f.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    用插件就可以了,还有有个问题啊,就是怎么设置那个回复邮件通知的,是不是需要虚拟主机支持什么的,目前还不知道怎么弄,有时间详细教我一下吧


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      插件据说有点问题的 还是代码的好 呵呵
      看我这篇文章 前期修改的 我都记录在这里
      http://blog.haitianhome.com/wordpress-xiugai.html


  13. Warning: copy(/home/wwwroot/haitian/blog/avatar/80151e5c57b21bd25c42f77ec583f02c.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    呵呵 我是打酱油的 :lol:


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      话说 我们都看的出来


  14. Warning: copy(/home/wwwroot/haitian/blog/avatar/5bde6c2b805a12f7c2991aab96ebf011.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    期待很久了,呵呵


  15. Warning: copy(/home/wwwroot/haitian/blog/avatar/2722b1ced17f740e0f1a011941d1e0cc.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    :roll:

icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif 

« 国庆结束,海天回来了 代码生成Wordpress全面SEO信息Keywords,Description,Title »