<?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; Google Sitemaps</title>
	<atom:link href="http://imcat.in/tag/google-sitemaps/feed/" rel="self" type="application/rss+xml" />
	<link>http://imcat.in</link>
	<description>人的头脑太复杂,时间过得久,有时候连自己也被自己骗了,记下来才是最真实的……</description>
	<lastBuildDate>Fri, 21 Oct 2011 17:55:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>修改Google Sitemaps 支持 Wordress 3.0</title>
		<link>http://imcat.in/google-sitemaps-support-wordpress/</link>
		<comments>http://imcat.in/google-sitemaps-support-wordpress/#comments</comments>
		<pubDate>Wed, 26 May 2010 13:53:19 +0000</pubDate>
		<dc:creator>Cat.</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Google Sitemaps]]></category>
		<category><![CDATA[Google XML Sitemaps Generator]]></category>
		<category><![CDATA[wordpress 3.0]]></category>

		<guid isPermaLink="false">http://imcat.in/?p=1293</guid>
		<description><![CDATA[我很早就升级到Wordpress 3.0,一直在测试着插件的兼容性,发现Wordpress 3.0还是兼容大部分插件的.但是当我启动了Wordpress 3.0的多站点功能的时,发现Google XML Sitemaps Generator这个插件不支持Wordpress 3.0,只要是生成的sitemap.xml路径不对了,Wordpress 3.0 多站点功能是不能将文件生成在根目录的,而是以这种形式存在的:http://imcat.in/files/sitemap.xml 那么只要简单的改修下Google XML Sitemaps 就可以让它支持Wordpress 3.0了. 首先打开sitemap-core.php文件,找到类似function GetXmlUrl($forceAuto=false) 的,修改为: function GetXmlUrl($forceAuto=false) { &#160; &#160; if(!$forceAuto &#38;amp;&#38;amp; $this-&#38;gt;GetOption(&#38;quot;b_location_mode&#38;quot;)==&#38;quot;manual&#38;quot;) { &#160; &#160; &#160; &#160; return $this-&#38;gt;GetOption(&#38;quot;b_fileurl_manual&#38;quot;); &#160; &#160; } else { &#160; &#160; &#160; &#160; return trailingslashit(get_bloginfo('siteurl')) . 'files/' . &#160; &#160; &#160; &#160; &#160; &#160; $this-&#38;gt;GetOption(&#38;quot;b_filename&#38;quot;); &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>我很早就升级到Wordpress 3.0,一直在测试着插件的兼容性,发现Wordpress 3.0还是兼容大部分插件的.但是当我启动了Wordpress 3.0的多站点功能的时,发现<a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">Google  XML Sitemaps Generator</a>这个插件不支持Wordpress 3.0,只要是生成的<a href="http://imcat.in/files/sitemap.xml">sitemap.xml</a>路径不对了,Wordpress 3.0 多站点功能是不能将文件生成在根目录的,而是以这种形式存在的:http://imcat.in/files/sitemap.xml</p>
<p>那么只要简单的改修下Google XML Sitemaps 就可以让它支持Wordpress 3.0了.</p>
<p>首先打开sitemap-core.php文件,找到类似function GetXmlUrl($forceAuto=false) 的,修改为:<br />
<span id="more-1293"></span></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function GetXmlUrl($forceAuto=false) {<br />
&nbsp; &nbsp; if(!$forceAuto &amp;amp;&amp;amp; $this-&amp;gt;GetOption(&amp;quot;b_location_mode&amp;quot;)==&amp;quot;manual&amp;quot;) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $this-&amp;gt;GetOption(&amp;quot;b_fileurl_manual&amp;quot;);<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return trailingslashit(get_bloginfo('siteurl')) . 'files/' .<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&amp;gt;GetOption(&amp;quot;b_filename&amp;quot;);<br />
&nbsp; &nbsp; }<br />
}</div></div>
<p>接着找到function GetXmlPath($forceAuto=false) 这个,修改为:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function GetXmlPath($forceAuto=false) {<br />
&nbsp; &nbsp; if(!$forceAuto &amp;amp;&amp;amp; $this-&amp;gt;GetOption(&amp;quot;b_location_mode&amp;quot;)==&amp;quot;manual&amp;quot;) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $this-&amp;gt;GetOption(&amp;quot;b_filename_manual&amp;quot;);<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; wp_mkdir_p(ABSPATH . UPLOADS);<br />
&nbsp; &nbsp; &nbsp; &nbsp; return ABSPATH . UPLOADS &nbsp;. $this-&amp;gt;GetOption(&amp;quot;b_filename&amp;quot;);<br />
&nbsp; &nbsp; }<br />
}</div></div>
<p>现在你的Google Sitemaps就可以正常工作了.</p>
<h2  class="related_post_title">暧味日志</h2><ul class="related_post"><li><a href="http://imcat.in/wordpress-on-nginx-apache-mod_rewrite-enabled/" title="WordPress在Nginx中启用Apache的mod_rewrite">WordPress在Nginx中启用Apache的mod_rewrite</a> (6)</li><li><a href="http://imcat.in/close-wordpress-3-1-toolbar/" title="关闭 WordPress 3.1 的管理工具条">关闭 WordPress 3.1 的管理工具条</a> (3)</li><li><a href="http://imcat.in/wordpress-home-not-display-categories-articles/" title="WordPress首页不显示某些分类的文章">WordPress首页不显示某些分类的文章</a> (6)</li><li><a href="http://imcat.in/nginx-wordpress-3-0-rewrite/" title="nginx 下的 wordpress 3.0 rewrite规则">nginx 下的 wordpress 3.0 rewrite规则</a> (13)</li><li><a href="http://imcat.in/nginx-301-redirect-in-wordpress/" title="WordPress的Nginx 301重定向">WordPress的Nginx 301重定向</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://imcat.in/google-sitemaps-support-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

