<?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>中立博客 &#187; all in one seo</title>
	<atom:link href="http://yesmyidea.com/tag/all-in-one-seo/feed/" rel="self" type="application/rss+xml" />
	<link>http://yesmyidea.com</link>
	<description>Yes my idea dot com</description>
	<lastBuildDate>Sun, 29 Aug 2010 14:54:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>All in one seo被彻底抛弃！</title>
		<link>http://yesmyidea.com/all-in-one-seo-have-been-completely-abandoned/</link>
		<comments>http://yesmyidea.com/all-in-one-seo-have-been-completely-abandoned/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 17:01:33 +0000</pubDate>
		<dc:creator>中立</dc:creator>
				<category><![CDATA[网站应用]]></category>
		<category><![CDATA[all in one seo]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://yesmyidea.com/?p=10353</guid>
		<description><![CDATA[介绍抛弃all in one seo之后的几种SEO优化方法，以完全替代all in one seo.]]></description>
			<content:encoded><![CDATA[<p><strong>All in one seo</strong>被我彻底抛弃了，首先是原因，为什么要抛弃它。</p>
<p><a href="http://yesmyidea.com/">中立博客</a>最近一直在更新，Wordpress我也是这几天不断的倒腾，但是使用的感觉超爽，不断地给我带来惊喜。反而只有All in one seo，却给我惹了麻烦。在All in one seo设置好了以后，使用非常麻烦，从Title,description到keywords，都需要一一填写，我武断地以为Title如果不重写就会使用默认，这直接导致的结果就是我的刚被Google收录的文章全部没有标题！还有一个问题，如果我想使用Live Writer这样的桌面端或者手机的话，因为这个插件的存在就成了不可能的事情。再者，这个插件的升级等都挺麻烦，而且运行这个插件很占资源。所以，<strong>All in one seo</strong>，很烦！</p>
<p>虽然不是旧爱，但是抛弃之后总归要寻个新欢，这个新欢的基本标准就是：1）保留原有的目录结构，这非常重要，否则会被搜索引擎处罚；2）给文章添加正确的description和keywords；3）给存档、分类、标签页填加noindex。</p>
<p>一、保留目录结构<br />
<span id="more-10353"></span><br />
在header.php中替代原有的title语句，</p>
<p><code>&lt;title&gt;&lt;?php if (is_home() ) { ?&gt;中立博客|关注互联网创业和IT技术&lt;?php } else {?&gt;&lt;?php wp_title(''); ?&gt; |中立博客&lt;?php } ?&gt;&lt;/title&gt;</code></p>
<p>这里大家就别使用函数了，直接把你的标题写进去，这样更节省资源。</p>
<p>二、关键字和描述</p>
<p>这有几种方法，首先看使用自定义域的方法，</p>
<p>&lt;?php<br />
if(is_single()||is_page()) :<br />
$description = get_post_meta($post-&gt;ID, &#8220;description&#8221;, true);<br />
if($description!=&#8221;") echo(&#8220;&lt;meta name=\&#8221;description\&#8221; content=\&#8221;".$description.&#8221;\&#8221; /&gt;&#8221;);<br />
$keywords = get_post_meta($post-&gt;ID, &#8220;keywords&#8221;, true);<br />
if($keywords!=&#8221;") echo(&#8220;&lt;meta name=\&#8221;keywords\&#8221; content=\&#8221;".$keywords.&#8221;\&#8221; /&gt;&#8221;);<br />
endif;<br />
?&gt;</p>
<p>这段代码的好处是避免了打开主页、存档页等多日志的页面时会输出第一篇文章的description和keywords的问题。</p>
<p>下面的这个方法则更简单，如国给日志添加了摘要就把摘要做为 Description，如果没有设置摘要，则把文章标题作为Description，而标签直接作为 Keywords。</p>
<p>&lt;?if (is_home()){<br />
$description = &#8220;中立博客是一个关注互联网创业和IT技术的博客，主要提供互联网创业资讯、评论，it技术和数码技术、网络赚钱等&#8221;;<br />
$keywords = &#8220;创业,互联网,Wordpress,数码,网络赚钱&#8221;;<br />
} elseif (is_single()){<br />
if ($post-&gt;post_excerpt) {<br />
$description     = $post-&gt;post_excerpt;<br />
} else {<br />
$description = $post-&gt;post_title ;<br />
}<br />
$keywords = &#8220;&#8221;;<br />
$tags = wp_get_post_tags($post-&gt;ID);<br />
foreach ($tags as $tag ) {<br />
$keywords = $keywords . $tag-&gt;name . &#8220;, &#8220;;<br />
}<br />
} elseif(is_category()){<br />
$description = category_description();<br />
}<br />
?&gt;<br />
&lt;meta name=&#8221;keywords&#8221; content=&#8221;&lt;?=$keywords?&gt;&#8221; /&gt;<br />
&lt;meta name=&#8221;description&#8221; content=&#8221;&lt;?=$description?&gt;&#8221; /&gt;</p>
<p>这个方法好在简单，方便，值得推荐，还逼着自己不滥用标签，好好把握关键词。</p>
<p>三、关于解决存档页、作者页、标签和分类页的“noindex”的问题</p>
<p>以下引用 <a href="http://ishawn.net/" target="_blank">shawn </a>大师的解决办法。既然百度爬虫太傻，那就针对 Google 爬虫写，在 header.php 里加这么一句：<br />
&lt;?php if ( !(is_home()) and !(is_single()) ) { ?&gt;&lt;meta name=&#8221;Googlebot&#8221; content=&#8221;noindex,follow&#8221; /&gt;&lt;?php }?&gt;</p>
<p>意思就是除了首页和文章，其它页面最好不要 index。另外这句话前面最好加个空行。</p>
<p>好了，彻底抛弃了<strong>All in one seo</strong>!</p>
<p>下面附录一份完整的：<br />
&lt;!&#8211; SEO START &#8211;&gt;<br />
&lt;title&gt;&lt;?php if (is_home() ) { ?&gt;电脑租赁,笔记本租赁,显示器租赁等专业IT租赁供应商|锐连租赁&lt;?php } else {?&gt;&lt;?php wp_title(&#8221;); ?&gt; |锐连租赁&lt;?php } ?&gt;&lt;/title&gt;<br />
&lt;?if (is_home()){<br />
$description = &#8220;锐连租赁是中国领先的IT租赁供应商,主要提供电脑租赁,笔记本租赁,显示器租赁和其他IT租赁专业供应商,是客户选择出租电脑,出租笔记本和显示器出租的第一选择&#8221;;<br />
$keywords = &#8220;电脑租赁,出租电脑,笔记本租赁,出租笔记本,显示器租赁&#8221;;<br />
} elseif (is_single()){</p>
<p>if ($post-&gt;post_excerpt) {<br />
$description = $post-&gt;post_excerpt;<br />
} else {</p>
<p>$description = $post-&gt;post_title;<br />
}<br />
$keywords = &#8220;&#8221;;<br />
$tags = wp_get_post_tags($post-&gt;ID);<br />
foreach ($tags as $tag ) {<br />
$keywords = $keywords . $tag-&gt;name . &#8220;, &#8220;;<br />
}<br />
} elseif(is_category()){<br />
$description = category_description();<br />
}<br />
?&gt;<br />
&lt;?php if (is_single()||is_home()) {?&gt;<br />
&lt;meta name=&#8221;keywords&#8221; content=&#8221;&lt;?=$keywords?&gt;&#8221; /&gt;<br />
&lt;meta name=&#8221;description&#8221; content=&#8221;&lt;?=$description?&gt;&#8221; /&gt;<br />
&lt;?php } ?&gt;<br />
&lt;?php if (is_page()):<br />
$keywords = get_post_meta($post-&gt;ID, &#8220;keywords&#8221;, true);<br />
if($keywords!=&#8221;") echo(&#8220;&lt;meta name=\&#8221;keywords\&#8221; content=\&#8221;".$keywords.&#8221;\&#8221; /&gt;\n&#8221;);<br />
$description = get_post_meta($post-&gt;ID, &#8220;description&#8221;, true);<br />
if($description!=&#8221;") echo(&#8220;&lt;meta name=\&#8221;description\&#8221; content=\&#8221;".$description.&#8221;\&#8221; /&gt;\n&#8221;);<br />
endif;<br />
?&gt;<br />
&lt;?php if ( !(is_home()) and !(is_single()) and !(is_page())) { ?&gt;&lt;meta name=&#8221;robots&#8221; content=&#8221;noindex,follow&#8221; /&gt;&lt;?php }?&gt;<br />
&lt;!&#8211; SEO END &#8211;&gt;</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li><a href="http://yesmyidea.com/the-most-perfectly-optimized-to-streamline-the-plug-in-wordpress-blog/" title="最精简插件完美优化wordpress博客">最精简插件完美优化wordpress博客</a></li><li><a href="http://yesmyidea.com/recommended-2-wordpress-plugins-seo-related/" title="推荐两个SEO相关Wordpress插件">推荐两个SEO相关Wordpress插件</a></li><li><a href="http://yesmyidea.com/the-experience-of-earned-100000-u-s-dollars-per-month/" title="月赚10万美金的经验">月赚10万美金的经验</a></li><li><a href="http://yesmyidea.com/discuz-shopex-ecms-wordpress-successfully-moving/" title="Discuz、Shopex、帝国CMS和Wordpress成功搬家">Discuz、Shopex、帝国CMS和Wordpress成功搬家</a></li><li><a href="http://yesmyidea.com/feedburner-and-feedsky-truly-seamless-link-between-the-different-feed/" title="真正实现Feedburner和Feedsky不同Feed之间的无缝链接">真正实现Feedburner和Feedsky不同Feed之间的无缝链接</a></li><li><a href="http://yesmyidea.com/use-google-translate-to-create-chinese-english-bilingual-blog/" title="利用Google Translate打造中英文双语博客">利用Google Translate打造中英文双语博客</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://yesmyidea.com/all-in-one-seo-have-been-completely-abandoned/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
