How to remove specific post type indexes from sitemap_index.xml #21875
Unanswered
kory-northrop
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used Yoast's API to add 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 a separate 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 thewpseo_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 made up 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.Beta Was this translation helpful? Give feedback.
All reactions