Exclude custom posts from sitemap programmatically
-
Hello,
I have a custom post type which has a field “has_detail_page”, which can be set while editing a post of this type.
Now I would like to exclude posts which do not have a detail page, exclude from WordPress.
Of course I could add those posts manually to “Posts to exclude” field in sitemap configuration. But this is not very comfortable.
Is there a filter before the post is outputted to the sitemap?
Or, if it does not work with a filter, do I have the possibility to fill “Posts to exclude” programmatically?Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Exclude custom posts from sitemap programmatically’ is closed to new replies.