Quantcast
Channel: Active questions tagged yoast - Stack Overflow
Viewing all articles
Browse latest Browse all 108

How to remove specific post type indexes from Yoast sitemap_index.xml

$
0
0

I used Yoast's API to create a custom XML sitemap that combines all of my website pages and a few other post types into one. I do the same thing for translated pages so that they are in their own sitemap.

I want to remove the Yoast-created XML sitemaps from the sitemap_index.xml so only my custom sitemap is there. I cannot find any references to how to accomplish this. I tried using the wpseo_sitemap_exclude_post_type filter to remove the post types for the other sitemaps, but doing so removed my custom sitemap from the sitemap index as well (since it is comprised of the same post types that I excluded).

Is there any way to do this? This screenshot shows what I'm talking about, I want to remove https://mywebsite.kinsta.cloud/page-sitemap.xml and https://mywebsite.kinsta.cloud/people-sitemap.xml from the sitemap index and just have https://mywebsite.kinsta.cloud/fullsite-sitemap.xml and https://mywebsite.kinsta.cloud/es/fullsite-sitemap.xml.

enter image description here


Viewing all articles
Browse latest Browse all 108

Trending Articles