{"id":116741,"date":"2020-01-31T02:11:07","date_gmt":"2020-01-31T02:11:07","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/core-sitemaps\/"},"modified":"2020-08-11T13:56:38","modified_gmt":"2020-08-11T13:56:38","slug":"core-sitemaps","status":"closed","type":"plugin","link":"https:\/\/es.wordpress.org\/plugins\/core-sitemaps\/","author":368236,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4.3","stable_tag":"0.4.3","tested":"5.5.18","requires":"5.4","requires_php":"5.6","requires_plugins":"","header_name":"Core Sitemaps","header_author":"Core Sitemaps Plugin Contributors","header_description":"A feature plugin to integrate basic XML Sitemaps in WordPress Core","assets_banners_color":"","last_updated":"2020-08-11 13:56:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/GoogleChromeLabs\/wp-sitemaps","header_author_uri":"https:\/\/github.com\/GoogleChromeLabs\/wp-sitemaps\/graphs\/contributors","rating":4.7,"author_block_rating":0,"active_installs":900,"downloads":11044,"num_ratings":0,"support_threads":5,"support_threads_resolved":2,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":"2","5":"5"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0","0.2.0","0.3.0","0.4.0","0.4.1","0.4.2","0.4.3"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[60],"plugin_tags":[186,6360],"plugin_category":[55],"plugin_contributors":[79088,80819,82956,144821,80418,165234],"plugin_business_model":[],"class_list":["post-116741","plugin","type-plugin","status-closed","hentry","plugin_section-beta","plugin_tags-seo","plugin_tags-sitemaps","plugin_category-seo-and-marketing","plugin_contributors-joemcgill","plugin_contributors-kburgoine","plugin_contributors-pacifika","plugin_contributors-pbiron","plugin_contributors-swissspidy","plugin_contributors-tweetythierry","plugin_committers-joemcgill","plugin_committers-swissspidy","plugin_committers-tweetythierry"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/core-sitemaps.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>Note: This feature has been integrated into WordPress 5.5. If you run WordPress 5.5, you can freely disable this plugin.<\/strong><\/p>\n\n<p>As <a href=\"https:\/\/make.wordpress.org\/core\/2019\/06\/12\/xml-sitemaps-feature-project-proposal\/\">originally proposed in June 2019<\/a>, this feature plugin seeks to integrate basic XML Sitemaps functionality in WordPress Core.<\/p>\n\n<p>A short explanation of how this plugin works can be found on <a href=\"https:\/\/make.wordpress.org\/core\/2020\/01\/27\/feature-plugin-xml-sitemaps\/\">this make\/core blog post<\/a>.<\/p>\n\n<p>Interested in contributing to this plugin? Feel free to <a href=\"https:\/\/github.com\/GoogleChromeLabs\/wp-sitemaps\">join us on GitHub<\/a> and the <a href=\"https:\/\/wordpress.slack.com\/archives\/CTKTGNJJW\">#core-sitemaps<\/a> Slack channel.<\/p>\n\n<h3>Available Hooks and Filters<\/h3>\n\n<p><strong>General:<\/strong><\/p>\n\n<ul>\n<li><code>wp_sitemaps_enabled<\/code> - Filters whether XML Sitemaps are enabled or not.<\/li>\n<li><code>wp_sitemaps_max_urls<\/code> - Filters the maximum number of URLs displayed on a sitemap.<\/li>\n<li><code>wp_sitemaps_register_providers<\/code> - Filters the list of registered sitemap providers.<\/li>\n<li><code>wp_sitemaps_init<\/code> - Fires when initializing sitemaps.<\/li>\n<li><code>wp_sitemaps_index_entry<\/code> - Filters the sitemap entry for the sitemap index.<\/li>\n<\/ul>\n\n<p><strong>Providers:<\/strong><\/p>\n\n<ul>\n<li><code>wp_sitemaps_post_types<\/code> - Filters the list of post types to include in the sitemaps.<\/li>\n<li><code>wp_sitemaps_posts_entry<\/code> - Filters the sitemap entry for an individual post.<\/li>\n<li><code>wp_sitemaps_posts_show_on_front_entry<\/code> - Filters the sitemap entry for the home page when the 'show_on_front' option equals 'posts'.<\/li>\n<li><code>wp_sitemaps_posts_query_args<\/code> - Filters the query arguments for post type sitemap queries.<\/li>\n<li><code>wp_sitemaps_posts_pre_url_list<\/code> - Filters the posts URL list before it is generated (short-circuit).<\/li>\n<li><code>wp_sitemaps_posts_pre_max_num_pages<\/code> - Filters the max number of pages before it is generated (short-circuit).<\/li>\n<li><code>wp_sitemaps_taxonomies<\/code> - Filters the list of taxonomies to include in the sitemaps.<\/li>\n<li><code>wp_sitemaps_taxonomies_entry<\/code> - Filters the sitemap entry for an individual term.<\/li>\n<li><code>wp_sitemaps_taxonomies_query_args<\/code> - Filters the query arguments for taxonomy terms sitemap queries.<\/li>\n<li><code>wp_sitemaps_taxonomies_pre_url_list<\/code> - Filters the taxonomies URL list before it is generated (short-circuit).<\/li>\n<li><code>wp_sitemaps_taxonomies_pre_max_num_pages<\/code> - Filters the max number of pages before it is generated (short-circuit).<\/li>\n<li><code>wp_sitemaps_users_entry<\/code> - Filters the sitemap entry for an individual user.<\/li>\n<li><code>wp_sitemaps_users_query_args<\/code> - Filters the query arguments for user sitemap queries.<\/li>\n<li><code>wp_sitemaps_users_pre_url_list<\/code> - Filters the users URL list before it is generated (short-circuit).<\/li>\n<li><code>wp_sitemaps_users_pre_max_num_pages<\/code> - Filters the max number of pages before it is generated (short-circuit).<\/li>\n<\/ul>\n\n<p><strong>Stylesheets:<\/strong><\/p>\n\n<ul>\n<li><code>wp_sitemaps_stylesheet_css<\/code> - Filters the CSS for the sitemap stylesheet.<\/li>\n<li><code>wp_sitemaps_stylesheet_url<\/code> - Filters the URL for the sitemap stylesheet.<\/li>\n<li><code>wp_sitemaps_stylesheet_content<\/code> - Filters the content of the sitemap stylesheet.<\/li>\n<li><code>wp_sitemaps_stylesheet_index_url<\/code> - Filters the URL for the sitemap index stylesheet.<\/li>\n<li><code>wp_sitemaps_stylesheet_index_content<\/code> - Filters the content of the sitemap index stylesheet.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<h4>Installation from within WordPress<\/h4>\n\n<ol>\n<li>Visit <strong>Plugins &gt; Add New<\/strong>.<\/li>\n<li>Search for <strong>Core Sitemaps<\/strong>.<\/li>\n<li>Install and activate the Core Sitemaps plugin.<\/li>\n<\/ol>\n\n<h4>Manual installation<\/h4>\n\n<ol>\n<li>Upload the entire <code>core-sitemaps<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Visit <strong>Plugins<\/strong>.<\/li>\n<li>Activate the Core Sitemaps plugin.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt><h3>How can I fully disable sitemap generation?<\/h3><\/dt>\n<dd><p>If you update the WordPress settings to discourage search engines from indexing your site, sitemaps will be disabled.\nAlternatively, use the <code>wp_sitemaps_enabled<\/code> filter, or use <code>remove_action( 'init', 'wp_sitemaps_get_server' );<\/code> to disable initialization of any sitemap functionality.<\/p><\/dd>\n<dt><h3>How can I disable sitemaps for a certain object type?<\/h3><\/dt>\n<dd><p>You can use the <code>wp_sitemaps_register_providers<\/code> filter to disable sitemap generation for posts, users, or taxonomies.<\/p><\/dd>\n<dt><h3>How can I disable sitemaps for a certain post type or taxonomy?<\/h3><\/dt>\n<dd><p>You can use the <code>wp_sitemaps_post_types<\/code> filter to disable sitemap generation for posts of a certain post type.<\/p>\n\n<p>By default, only public posts will be represented in the sitemap.<\/p>\n\n<p>Similarly, the <code>wp_sitemaps_taxonomies<\/code> filter can be used to disable sitemap generation for certain taxonomies.<\/p>\n\n<p><strong>Example: Disabling sitemaps for the \"page\" post type<\/strong><\/p>\n\n<pre><code>add_filter(\n    'wp_sitemaps_post_types',\n    function( $post_types ) {\n        unset( $post_types['page'] );\n        return $post_types;\n    }\n);\n<\/code><\/pre>\n\n<p><strong>Example: Disabling sitemaps for the \"post_tag\" taxonomy<\/strong><\/p>\n\n<pre><code>add_filter(\n    'wp_sitemaps_taxonomies',\n    function( $taxonomies ) {\n        unset( $taxonomies['post_tag'] );\n        return $taxonomies;\n    }\n);\n<\/code><\/pre><\/dd>\n<dt><h3>How can I exclude certain posts \/ taxonomies \/ users from the sitemap or add custom ones?<\/h3><\/dt>\n<dd><p>The <code>wp_sitemaps_posts_query_args<\/code>, <code>wp_sitemaps_taxonomies_query_args<\/code>, and <code>wp_sitemaps_users_query_args<\/code> filters can be used to modify the underlying queries. Using these queries, certain items can be excluded.<\/p>\n\n<p><strong>Example: Ensuring the page with ID 42 is not included<\/strong><\/p>\n\n<pre><code>add_filter(\n    'wp_sitemaps_posts_query_args',\n    function( $args ) {\n        $args['post__not_in'] = isset( $args['post__not_in'] ) ? $args['post__not_in'] : array();\n        $args['post__not_in'][] = 42;\n        return $args;\n    }\n);\n<\/code><\/pre>\n\n<p><strong>Example: Ensuring the category with ID 7 is not included<\/strong><\/p>\n\n<pre><code>add_filter(\n    'wp_sitemaps_taxonomies_query_args',\n    function( $args ) {\n        $args['exclude'] = isset( $args['exclude'] ) ? $args['exclude'] : array();\n        $args['exclude'][] = 7;\n        return $args;\n    }\n);\n<\/code><\/pre>\n\n<p><strong>Example: Ensuring the user with ID 1 is not included<\/strong><\/p>\n\n<pre><code>add_filter(\n    'wp_sitemaps_users_query_args',\n    function( $args ) {\n        $args['exclude'] = isset( $args['exclude'] ) ? $args['exclude'] : array();\n        $args['exclude'][] = 1;\n        return $args;\n    }\n);\n<\/code><\/pre><\/dd>\n<dt><h3>How can I add `changefreq`, `priority`, or `lastmod` to a sitemap?<\/h3><\/dt>\n<dd><p>You can use the <code>wp_sitemaps_posts_entry<\/code> \/ <code>wp_sitemaps_users_entry<\/code> \/ <code>wp_sitemaps_taxonomies_entry<\/code> filters to add additional attributes like <code>changefreq<\/code>, <code>priority<\/code>, or <code>lastmod<\/code> to single item in the sitemap.<\/p>\n\n<p><strong>Example: Adding the last modified date for posts<\/strong><\/p>\n\n<pre><code>add_filter(\n    'wp_sitemaps_posts_entry',\n    function( $entry, $post ) {\n        $entry['lastmod'] = $post-&gt;post_modified_gmt;\n        return $entry;\n    },\n    10,\n    2\n);\n<\/code><\/pre>\n\n<p>Similarly, you can use the <code>wp_sitemaps_index_entry<\/code> filter to add <code>lastmod<\/code> on the sitemap index. Note: <code>changefreq<\/code> and <code>priority<\/code> are not supported on the sitemap index.<\/p><\/dd>\n<dt><h3>How can I add image sitemaps?<\/h3><\/dt>\n<dd><p>Adding image sitemaps are not supported yet, but support will be added in the future so that plugin developers can add them if needed.<\/p><\/dd>\n<dt><h3>How can I change the number of URLs per sitemap?<\/h3><\/dt>\n<dd><p>Use the <code>wp_sitemaps_max_urls<\/code> filter to adjust the maximum number of URLs included in a sitemap. The default value is 2000 URLs.<\/p><\/dd>\n<dt><h3>How can I change the appearance of the XML sitemaps in the browser using XSL?<\/h3><\/dt>\n<dd><p>A variety of filters exist to allow you to adjust the styling:<\/p>\n\n<ul>\n<li><code>wp_sitemaps_stylesheet_url<\/code> - Filter the URL for the sitemap stylesheet.<\/li>\n<li><code>wp_sitemaps_stylesheet_index_url<\/code> - Filter the URL for the sitemap index stylesheet.<\/li>\n<li><code>wp_sitemaps_stylesheet_content<\/code> - Filter the content of the sitemap stylesheet.<\/li>\n<li><code>wp_sitemaps_index_stylesheet_content<\/code> - Filter the content of the sitemap index stylesheet.<\/li>\n<li><code>wp_sitemaps_stylesheet_css<\/code> - Filter the CSS only for the sitemap stylesheet.<\/li>\n<\/ul><\/dd>\n<dt><h3>Does this plugin support `changefreq` and `priority` attributes for sitemaps?<\/h3><\/dt>\n<dd><p>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 to.<\/p><\/dd>\n<dt><h3>Why is there no last modified date shown in the sitemap?<\/h3><\/dt>\n<dd><p>XML sitemaps are first and foremost a discovery mechanism for content. Exposing the date the content was last modified is not needed for the majority of sites.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>For the plugin's changelog, please check out the full list of changes <a href=\"https:\/\/github.com\/GoogleChromeLabs\/wp-sitemaps\/blob\/master\/CHANGELOG.md\">on GitHub<\/a>.<\/p>","raw_excerpt":"A feature plugin to integrate basic XML Sitemaps in WordPress Core.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/116741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=116741"}],"author":[{"embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/swissspidy"}],"wp:attachment":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=116741"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=116741"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=116741"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=116741"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=116741"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=116741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}