home

WordPress的关键字优化

这里,我把tag做为keywords来用.我的blog用的是Ultimate Tag Warrior这个tag系统.它支持很多种的表现形式,功能很强大…关于它的使用,具体可以看 天佑 的这个文章 .
Ultimate Tag Warrior 教學
由于UTW默认的Tag的风格都是有链接的,但是在meta中只是要tag的关键字,不要多余的信息,我们就得自已定义新的风格,在ultimate-tag-warrior.php文件中,加入以下代码:

  1. function UTW_ShowTagsForCurrentPostAsKeywords(){
  2.         global $utw,$post;
  3.         $format = array(
  4.                 'single'=>'%tag%',
  5.                 'first'=>'%tag%',
  6.                 'default'=>',%tag%',
  7.                 'last'=>',%tag%');
  8.         $utw->ShowTagsForPost($post->ID, $format, 0);
  9. }

这种显示方式就是:

google,mysql,wordpress,keywords,description,meta

然后同上,在header.php中加入以下代码:

  1. <meta name="keywords" content="<?php 
  2.                 if ( is_single() && function_exists('UTW_ShowTagsForCurrentPostAsKeywords') ){  UTW_ShowTagsForCurrentPostAsKeywords();   }
  3.                 ?>" />

Created By: sb123

Form Page: WordPress的关键字优化


2 Responses to “WordPress的关键字优化”

  1. 中文域名
    March 29th, 2007 15:12
    2

    菜鸟学到东西了,呵呵

  2. pcqtvnui qbvoamhi
    March 2nd, 2007 13:27
    1

    fejcwgd ujpwban mstfi pdvfcg xpdhb kvgarpfj ujhac

留言中至少要有一个中文字

Leave a Reply