Core Sitemaps

外掛說明

As originally proposed in June 2019, this feature plugin seeks to integrate basic XML Sitemaps functionality in WordPress Core.

A short explanation of how this plugin works can be found on this make/core blog post.

Interested in contributing to this plugin? Feel free to join us on GitHub and the #core-sitemaps Slack channel.

安裝方式

Installation from within WordPress

  1. Visit Plugins > Add New.
  2. Search for Core Sitemaps.
  3. Install and activate the Core Sitemaps plugin.

Manual installation

  1. Upload the entire core-sitemaps folder to the /wp-content/plugins/ directory.
  2. Visit Plugins.
  3. Activate the Core Sitemaps plugin.

常見問題集

How can I fully disable sitemap generation?

You can use remove_action( 'init', 'core_sitemaps_get_server' ); to disable initialization of any sitemap functionality.

How can I disable sitemaps for a certain object type?

You can use the core_sitemaps_register_providers filter to disable sitemap generation for posts, users, or taxonomies.

How can I disable sitemaps for a certain post type or taxonomy?

You can use the core_sitemaps_post_types filter to disable sitemap generation for posts of a certain type.

By default, only public posts will be represented in the sitemap.

Similarly, the core_sitemaps_taxonomies filter can be used to disable sitemap generation for certain taxonomies.

How can I exclude certain posts / pages / users from the sitemap or add custom ones?

The core_sitemaps_taxonomies_url_list, core_sitemaps_users_url_list, and core_sitemaps_posts_url_list filters allow you to add or remove URLs as needed.

No UI option is exposed for this.

How can I change the number of URLs per sitemap?

Use the core_sitemaps_max_urls filter to adjust the maximum number of URLs included in a sitemap. The default value is 2000 URLs.

How can I change the appearance of the XML sitemaps in the browser using XSL?

A variety of filters exists to allow you adjust the styling:

  • core_sitemaps_stylesheet_url – Filter the URL for the sitemap stylesheet.
  • core_sitemaps_stylesheet_index_url – Filter the URL for the sitemap index stylesheet.
  • core_sitemaps_stylesheet_content – Filter the content of the sitemap stylesheet.
  • core_sitemaps_index_stylesheet_content – Filter the content of the sitemap index stylesheet.
  • core_sitemaps_stylesheet_css – Filter the CSS only for the sitemap stylesheet.
Does this plugin support `changefreq` and `priority` attributes for sitemaps?

No. Those are optional fields in the sitemaps protocol and not typically consumed by search engines. Developers can still add those fields if they really want too.

使用者評論

There are no reviews for this plugin.

參與者及開發者

以下人員參與了開源軟體〈Core Sitemaps〉的開發相關工作。

參與者

Core Sitemaps 外掛目前已有 11 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將 Core Sitemaps 外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

For the plugin’s changelog, please check out the full list of changes on GitHub.