Snippet doesn’t exclude tag from sitemap
-
Hi,
I’m trying to remove a tag from the sitemap.xml with this snippet in the functions.php
/* Exclude One Taxonomy From Yoast SEO Sitemap */ function sitemap_exclude_taxonomy( $value, $taxonomy ) { if ( $taxonomy == 'myslug' ) return true; } add_filter( 'wpseo_sitemap_exclude_taxonomy', 'sitemap_exclude_taxonomy', 10, 2 );
This snippet didn’t remove the link on the post_tag-sitemap.xml page.
My tag base permalink structure is domain.com/tag-base/tag-name. Could that be the reason?
Thanks
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Snippet doesn’t exclude tag from sitemap’ is closed to new replies.