Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Leave tags and authors out of the sitemap

WordPress’s built-in sitemap (/wp-sitemap.xml) lists your posts, pages and categories, but not tag archives or author pages.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Category SEO
  • Tested with WordPress 7.1
PHP
<?php

add_filter(
	'wp_sitemaps_taxonomies',
	static function ( $taxonomies ) {
		unset( $taxonomies['post_tag'] );
		return $taxonomies;
	}
);
add_filter(
	'wp_sitemaps_add_provider',
	static fn( $provider, $name ) => 'users' === $name ? false : $provider,
	10,
	2
);

In these packs

  • SEO basics: Meta descriptions, social sharing tags, article structured data and cleaner indexing, for sites without an SEO plugin.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.