Title: About empty categories
Last modified: May 11, 2026

---

# About empty categories

 *  Resolved [George](https://wordpress.org/support/users/giorgos93/)
 * (@giorgos93)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/about-empty-categories/)
 * Hi, I’ve enabled an option to exclude empty categories (without posts) from XML-
   sitemap. However, on my website I have several categories with subcategories 
   inside. And I never choose categories for posts – I only choose subcategories.
   Categories are used as an empty container for subcategories.
 * For example, I have a category “Randomizers”. And inside I have subcategories“
   Name randomizers”, “Character randomizers” etc, which have posts inside. So, 
   Rank Math SEO automatically exludes “Randomizers” category from sitemap because
   it has to be empty. However, it is not empty – WordPress (or my theme?) automatically
   collects all posts from subcategories inside a category.
 * So now the category page is not empty, but it is exluded from sitemap, because
   Rank Math SEO thinks it’s empty. And search crawlers try to add some categories
   for indexation, but they don’t find them in sitemap.
 * My question: is it an expected behaviour from your plugin? Or it has to include
   these categories in sitemap, because they are not empty?

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

 *  Plugin Support [Jaideep Asrani](https://wordpress.org/support/users/jaideeprm/)
 * (@jaideeprm)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/about-empty-categories/#post-18904548)
 * Hello [@giorgos93](https://wordpress.org/support/users/giorgos93/),
 * Thank you for contacting Rank Math support.
 * This is the expected behavior. Themes show the posts of the subcategories on 
   the category page, but if you check the category list in the backend, you will
   see that 0 posts are assigned to that category. When our plugin checks the database,
   it finds the same(zero posts) for the main category, and excludes it from the
   sitemap.
 * If you want to include main categories in the sitemap, then you should include
   the empty categories in the sitemap.
 * Please do not hesitate to let us know if you need our assistance with anything
   else.
 *  Thread Starter [George](https://wordpress.org/support/users/giorgos93/)
 * (@giorgos93)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/about-empty-categories/#post-18904731)
 * Hi, [@jaideeprm](https://wordpress.org/support/users/jaideeprm/) , thanks for
   the answer.
 * I’ve just disabled noindex for empty categories in Rank Math SEO settings, but
   my categories didn’t appear in sitemap after that.
 * I tried to purge my website’s cache, and I tried to flush the sitemap cache by
   following this instruction: [https://i.rankmath.com/pipRDp](https://i.rankmath.com/pipRDp),
   but it didn’t help. I also have this code in my functions.php (I tried to remove
   it and save the file, but it didn’t help as well):
 * **add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);**
 * How can I return empty categories in sitemap?
 *  Plugin Support [Rakibuzzaman Siam](https://wordpress.org/support/users/rakibuzzamansiam1/)
 * (@rakibuzzamansiam1)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/about-empty-categories/#post-18904924)
 * Hello [@giorgos93](https://wordpress.org/support/users/giorgos93/),
 * Please make sure the “Include Empty Terms” option is enabled in Rank Math > Sitemap
   Settings > Categories. Here’s a screenshot for your reference: [https://i.rankmath.com/i/9S0mDV](https://i.rankmath.com/i/9S0mDV)
 * Once done, please clear your sitemap cache and check again.
 * If the issue persists, please share some affected category URLs so we can investigate
   this further for you.
 * Please let us know how it goes. We look forward to helping you further.
 *  Thread Starter [George](https://wordpress.org/support/users/giorgos93/)
 * (@giorgos93)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/about-empty-categories/#post-18905058)
 * Hi, [@rakibuzzamansiam1](https://wordpress.org/support/users/rakibuzzamansiam1/),
   thanks for the answer. Yes, enabling “Include Empty Terms” option did help, thanks!
   Before, I tried another option.
 * However, I noticed, that if I enable “noindex for empty categories” option, then
   it doesn’t work – my categories are still indexed. In my case, I need this “empty”
   categories to be indexed, so it’s not a problem. But just in case decided to 
   tell you that – maybe it’s not an expected behaviour for categories without posts,
   which have subcategories with posts.
 *  Plugin Support [Jaideep Asrani](https://wordpress.org/support/users/jaideeprm/)
 * (@jaideeprm)
 * [2 weeks, 3 days ago](https://wordpress.org/support/topic/about-empty-categories/#post-18905647)
 * Hello [@giorgos93](https://wordpress.org/support/users/giorgos93/),
 * That’s the expected behavior. The parent category is not set to noindex if the
   child category has posts. We have also asked developers to look into this and
   see if the same can be done with the Include Empty Terms option of the sitemap
   settings.
 * Please do not hesitate to let us know if you need our assistance with anything
   else.
 * Thank you.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fabout-empty-categories%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330)
 * [Rank Math SEO – AI SEO Tools to Dominate SEO Rankings](https://wordpress.org/plugins/seo-by-rank-math/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/seo-by-rank-math/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/seo-by-rank-math/)
 * [Active Topics](https://wordpress.org/support/plugin/seo-by-rank-math/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seo-by-rank-math/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seo-by-rank-math/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Jaideep Asrani](https://wordpress.org/support/users/jaideeprm/)
 * Last activity: [2 weeks, 3 days ago](https://wordpress.org/support/topic/about-empty-categories/#post-18905647)
 * Status: resolved