Google XML Sitemaps – 好用的WordPress网站地图插件

虽然目前 WordPress 默认程序中也有自带SiteMap功能,但是比较简单的。如果我们希望有一款丰富功能的 网站地图功能插件,这里推荐用 Google XML Sitemaps。不过现在改名字叫做 XML Sitemaps。

Google XML Sitemaps - 好用的WordPress网站地图插件

插件是免费的,直接搜索下载。

插件地址:https://wordpress.org/plugins/google-sitemap-generator/

图片[2]-Google XML Sitemaps – 好用的WordPress网站地图插件-WordPress建站笔记

这里我们不要下载错。

图片[3]-Google XML Sitemaps – 好用的WordPress网站地图插件-WordPress建站笔记

其实我们不需要设置,直接用默认的也可以。

rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml$ "/index.php?xml_sitemap=params=$2" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml\.gz$ "/index.php?xml_sitemap=params=$2;zip=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html$ "/index.php?xml_sitemap=params=$2;html=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html.gz$ "/index.php?xml_sitemap=params=$2;html=true;zip=true" last;

如果是Nginx需要在伪静态规则加上。

图片[4]-Google XML Sitemaps – 好用的WordPress网站地图插件-WordPress建站笔记

我们也可以自定义给地图加上内容或者排除内容分类。

图片[5]-Google XML Sitemaps – 好用的WordPress网站地图插件-WordPress建站笔记

同时可以设置频率和优先权。

3.6/5 - (12 votes)
© 版权声明
THE END
喜欢就支持一下吧
点赞6 分享