Exclude all posts from specific categories

#127848
  • Resolved Laura Houx
    Rank Math free

    Hello,
    I’m trying to exclude all posts from specific categories in the RankMath generated Sitemap I have disallowed in robots.txt
    I have entered category ID numbers in Exclude Terms. But I’m not sure this is what I need to do.
    It doesn’t seem th change the post sitemap.
    Should I disallow all posts one by one or is there another option?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    Setting your posts/pages to noindex should be enough to exclude it to the sitemap:

    Gutenberg:
    noindex

    Classic Editor:
    noindex

    After that, the links should disappear in the sitemap pages.

    If you however still seeing the non-indexed links in the sitemap pages, flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    That should fix the issue. Please let me know if that does not. We are here to assist.

    Thanks. But this would have been way too long as I needed to exclude 150 posts. Instead I have imported post ID thanks to a plugin that displays post ID in WordPress post list. I then importe those in Excel… and created a list of ID to exclude this way
    Thanks

    Hello,

    Sorry for the delay here. We are glad it is working fine now.

    If you need further help or with anything else, please open a new support ticket here so we can help.

    We are always here for assistance.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Exclude all posts from specific categories’ is closed to new replies.