sirry 发表于 2018-11-22 15:12:13

Google XML Sitemaps 把地图多余的页头页脚去除办法

Google XML Sitemaps 是wordpress的一个地图插件,由于看到页头和页脚有些链接,为了简化一下地图,精简了部分代码。

首先找到地图sitemap.xml文件

路径:/wp-content/plugins/google-sitemap-generator/sitemap.xsl

找到代码删除:
   Generated with <a rel="external nofollow" href="http://www.arnebrachhold.de/redir/sitemap-home/" title="Google (XML) Sitemap Generator Plugin for WordPress">Google (XML) Sitemaps Generator Plugin for WordPress</a> by <a rel="external nofollow" href="http://www.arnebrachhold.de/">Arne Brachhold</a>. This XSLT template is released under the GPL and free to use.<br />
                                        If you have problems with your sitemap please visit the <a rel="external nofollow" href="http://www.arnebrachhold.de/redir/sitemap-x-faq/" title="Google (XML) sitemaps FAQ">plugin FAQ</a> or the <a rel="external nofollow" href="https://wordpress.org/support/plugin/google-sitemap-generator">support forum</a>.

再找代码删除(这里有两处需要删除):
      <div id="intro">
            <p>
                This is a XML Sitemap which is supposed to be processed by search engines which follow the XML Sitemap standard like Ask.com, Bing, Google and Yahoo.<br />
                It was generated using the <a rel="external nofollow" href="http://wordpress.org/">WordPress</a> content management system and the <strong><a rel="external nofollow" href="http://www.arnebrachhold.de/redir/sitemap-home/" title="Google (XML) Sitemaps Generator Plugin for WordPress">Google Sitemap Generator Plugin</a></strong> by <a rel="external nofollow" href="http://www.arnebrachhold.de/">Arne Brachhold</a>.<br />
                You can find more information about XML sitemaps on <a rel="external nofollow" href="http://sitemaps.org">sitemaps.org</a> and Google's <a rel="external nofollow" href="http://code.google.com/p/sitemap-generators/wiki/SitemapGenerators">list of sitemap programs</a>.
            </p>
      </div>

最后打开地图查看结果就行!
页: [1]
查看完整版本: Google XML Sitemaps 把地图多余的页头页脚去除办法