Skip to content

Instantly share code, notes, and snippets.

@Roy-Oto
Created May 14, 2021 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Roy-Oto/50661e96aaaf9238eaf444a0a8ca17dd to your computer and use it in GitHub Desktop.
Save Roy-Oto/50661e96aaaf9238eaf444a0a8ca17dd to your computer and use it in GitHub Desktop.
How to exclude post tags from wp-sitemap.xml
add_filter(
'wp_sitemaps_taxonomies',
function( $taxonomies ) {
unset( $taxonomies['post_tag'] );
return $taxonomies;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment