<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Very Life &#187; ALL IN ONE SEO PACK</title>
	<atom:link href="http://verylifes.com/tag/all-in-one-seo-pack/feed" rel="self" type="application/rss+xml" />
	<link>http://verylifes.com</link>
	<description>Simple happiness</description>
	<lastBuildDate>Sun, 28 Mar 2010 11:13:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>用原生代码替换ALL IN ONE SEO PACK</title>
		<link>http://verylifes.com/2009/replace-the-code-with-the-native-all-in-one-seo-pack.html</link>
		<comments>http://verylifes.com/2009/replace-the-code-with-the-native-all-in-one-seo-pack.html#comments</comments>
		<pubDate>Fri, 06 Nov 2009 08:23:44 +0000</pubDate>
		<dc:creator>whitewords</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ALL IN ONE SEO PACK]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[原生代码]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://verylifes.com/2009/replace-the-code-with-the-native-all-in-one-seo-pack.html</guid>
		<description><![CDATA[


 SEO，一个被无数博客作者浏览的高关键词，呵，它何以这么抢手？当然是由于它是搜索引擎最佳化的缩写，写博客非要针对搜索引擎来写吗？干嘛不能写给自己？你当然可以写给自己或自己的一个小圈子，再或者奉献给大众，但每一个公开的博客都或多或少的去优化一下自己对搜索引擎的友好度，以便提升自己网站在搜索引擎面前的知名度，最终提升自己的流量。呵，于是乎你SEO，我SEO，他也SEO，各种SEO的工具也油然而生，而在WordPress这个博客平台里，ALL IN ONE SEO PACK这个SEO优化插件无疑是最热门的，它都能做什么呢？简单说一下，因为大家都用得太多了。

ALL IN ONE SEO PACK可以：
1、可以给每篇文章添加独立的关键词；
2、可以给每篇文章添加独立的meta标签；
3、可以给每篇文章添加独立的description；
4、可以给每篇文章添加独立的摘要；
5、可以给每篇文章自动生成摘要；
6、可以防止存档页和首页的内容被抓取，从而防止因重复内容被google降权；
看，够优秀的吧，可无论一个插件如何的优秀，总还是有种种理由让我们不想使用它，比如ALL IN ONE SEO PACK与Simple Tagging在某一方面有冲突，再比如某些热爱纯净的朋友或折腾代码的朋友从心底的抵制，那么非要它不可吗？当然不是，ALL IN ONE SEO PACK也不过是个插件，也不过是由代码来写的，既然这样，我们就在自己的主题里添加一下吧，让我们也自己原生一下。
写之前要注意几点：
1、我所提供的代码不是我的原创，有很多是网上传抄的，我只是尽可能的合理安排结构和功能，让它看起来更直观简捷，又不失主体功能。
2、无论您用哪一种编辑器去写这些代码，我一再要提醒您，保存时要选对格式：UTF-8无BOM格式保存。
3、您所添加的所有代码都会在主题文件中操作，一旦您更换了主题，并且还需要这些代码，请务必要复制回来。
4、这些代码不是最好的，或许您有更多更好的方法，欢迎您来一起讨论。
好了，就这些，有问题可以在我的小博上留言，我会尽快回复的，下面我们来开始代码。
代码段一：
这段不算是个代码段，只能算是个注意吧，打开您主题文件中的 header.php 文件，在&#60;/head&#62; 之前要注意有如下代码：

1
&#60;?php wp_head&#40;&#41;; ?&#62;

代码段二：
打开您主题文件中的 functions.php 文件，在文件尾部的 ?&#62; 之前加上如下代码：

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// get categories name
function get_cats_name&#40;&#41; &#123;
  $allcats=get_categories&#40;&#41;;
  foreach &#40;$allcats as $category&#41; 
  &#123;
    $keywords&#91;&#93; = $category-&#62;cat_name;
  &#125;
  return $keywords;
&#125;
// utf8 [...]]]></description>
			<content:encoded><![CDATA[<p>SEO，一个被无数博客作者浏览的高关键词，呵，它何以这么抢手？当然是由于它是搜索引擎最佳化的缩写，写博客非要针对搜索引擎来写吗？干嘛不能写给自己？你当然可以写给自己或自己的一个小圈子，再或者奉献给大众，但每一个公开的博客都或多或少的去优化一下自己对搜索引擎的友好度，以便提升自己网站在搜索引擎面前的知名度，最终提升自己的流量。呵，于是乎你SEO，我SEO，他也SEO，各种SEO的工具也油然而生，而在WordPress这个博客平台里，ALL IN ONE SEO PACK这个SEO优化插件无疑是最热门的，它都能做什么呢？简单说一下，因为大家都用得太多了。<br />
<span id="more-4"></span><br />
ALL IN ONE SEO PACK可以：<br />
1、可以给每篇文章添加独立的关键词；<br />
2、可以给每篇文章添加独立的meta标签；<br />
3、可以给每篇文章添加独立的description；<br />
4、可以给每篇文章添加独立的摘要；<br />
5、可以给每篇文章自动生成摘要；<br />
6、可以防止存档页和首页的内容被抓取，从而防止因重复内容被google降权；</p>
<p>看，够优秀的吧，可无论一个插件如何的优秀，总还是有种种理由让我们不想使用它，比如ALL IN ONE SEO PACK与Simple Tagging在某一方面有冲突，再比如某些热爱纯净的朋友或折腾代码的朋友从心底的抵制，那么非要它不可吗？当然不是，ALL IN ONE SEO PACK也不过是个插件，也不过是由代码来写的，既然这样，我们就在自己的主题里添加一下吧，让我们也自己原生一下。</p>
<p>写之前要注意几点：<br />
1、我所提供的代码不是我的原创，有很多是网上传抄的，我只是尽可能的合理安排结构和功能，让它看起来更直观简捷，又不失主体功能。<br />
2、无论您用哪一种编辑器去写这些代码，我一再要提醒您，保存时要选对格式：UTF-8无BOM格式保存。<br />
3、您所添加的所有代码都会在主题文件中操作，一旦您更换了主题，并且还需要这些代码，请务必要复制回来。<br />
4、这些代码不是最好的，或许您有更多更好的方法，欢迎您来一起讨论。<br />
好了，就这些，有问题可以在我的小博上留言，我会尽快回复的，下面我们来开始代码。</p>
<p>代码段一：<br />
这段不算是个代码段，只能算是个注意吧，打开您主题文件中的 <span style="color: #ff0000;">header.php</span> 文件，在&lt;/head&gt; 之前要注意有如下代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_head<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>代码段二：<br />
打开您主题文件中的 <span style="color: #ff0000;">functions.php</span> 文件，在文件尾部的 ?&gt; 之前加上如下代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// get categories name</span>
<span style="color: #000000; font-weight: bold;">function</span> get_cats_name<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$allcats</span><span style="color: #339933;">=</span>get_categories<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$allcats</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span> 
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$keywords</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cat_name</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$keywords</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">// utf8 substr</span>
<span style="color: #000000; font-weight: bold;">function</span> utf8Substr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #339933;">,</span> <span style="color: #000088;">$from</span><span style="color: #339933;">,</span> <span style="color: #000088;">$len</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'</span><span style="color: #339933;">.</span><span style="color: #000088;">$from</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'}'</span><span style="color: #339933;">.</span>
                      <span style="color: #0000ff;">'((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'</span><span style="color: #339933;">.</span><span style="color: #000088;">$len</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'}).*#s'</span><span style="color: #339933;">,</span>
                      <span style="color: #0000ff;">'$1'</span><span style="color: #339933;">,</span><span style="color: #000088;">$str</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">// Meta SEO</span>
<span style="color: #000000; font-weight: bold;">function</span> meta_SEO<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//如果是文章页</span>
    <span style="color: #000088;">$keywords</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_excerpt</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//如果文章摘要存在就以文章摘要为描述</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_excerpt</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'...'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//如果文章摘要不存在就截断文章前200字为描述</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> utf8Substr<span style="color: #009900;">&#40;</span><span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'...'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>     
    <span style="color: #000088;">$tags</span> <span style="color: #339933;">=</span> wp_get_post_tags<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//取文章标签</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$tags</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$tag</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$keywordarray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tag</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #666666; font-style: italic;">//以文章标签为关键字</span>
    <span style="color: #000088;">$keywords</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span><span style="color: #990000;">array_unique</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#41;</span><span style="color: #000088;">$keywordarray</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//如果不是文章页</span>
    <span style="color: #000088;">$keywords</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//在引号间写入你博客的关键字用,断开</span>
    <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//在引号间写入你博客的简单描述，不要过200字</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$keywords</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//如果没写博客的关键字则以分类名为值</span>
      <span style="color: #000088;">$keywords</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span><span style="color: #990000;">array_unique</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#41;</span>get_cats_name<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> 
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$description</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//如果没写博客的描述则以副标题为值</span>
      <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blogdescription'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> 
  <span style="color: #009900;">&#125;</span>
  <span style="color: #666666; font-style: italic;">//输出描述</span>
  <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;meta name=&quot;description&quot; content=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$description</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">//输出关键字</span>
  <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;meta name=&quot;keywords&quot; content=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$keywords</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; /&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> OR is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> OR is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//如果是文章、分页、首页则允许robots</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">'&lt;meta name=&quot;robots&quot; content=&quot;index,follow,noarchive&quot; /&gt;'</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//如果不是则不允许</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">'&lt;meta name=&quot;robots&quot; content=&quot;noindex,follow,noarchive&quot; /&gt;'</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">'&lt;meta name=&quot;googlebot&quot; content=&quot;noarchive&quot; /&gt;'</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$output</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'meta_SEO'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//添加meta_SEO函数到头部信息里</span></pre></td></tr></table></div>

<p>好了，正确保存后就OK了，我想需要注意或需要解释的我都写了注释了，呵，如果还是不很明白，可以问我。就这样，一个原生的，简单的SEO就写好了，如果你的主题很标准，那么事实上你只需在 functions.php 这个文件里稍加操作就可以了，很简单吧，呵，如果你写自己的一个主题，那么也完全可以用进去，当然，你要是想发布主题的话，我想你已经是个高手了，应当知道如何更加优化和提供更改的设置。好啦，跟着某些人来说一句：我们的目标！纯净原生！:grin: </p>
<p><small><strong>Statement:</strong> Site follow the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Attribution-Noncommercial-Share Alike 3.0 Unported</a> agreement. Reprinted please specify switched </small><a href="http://verylifes.com/2009/replace-the-code-with-the-native-all-in-one-seo-pack.html">Very Life</a></p>
]]></content:encoded>
			<wfw:commentRss>http://verylifes.com/2009/replace-the-code-with-the-native-all-in-one-seo-pack.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
