Unable to exlcude pages from sitemap – bug probably

[ad_1]

Hi, all, I’m trying to exclude a lot of pages dynamicaly with noindex in rank_math_robots meta key.

I set up the filter rank_math/sitemap/include_noindex to return false.

And that didn’t work. So I dig a little further and I found that the problem with this approach is that the internal Rank Math function, which is fetching the rank_math_robots metadata, is passing single = true parameter to the get_meta function:
class-metadata.php:75 > returnget_metadata( $this->meta_type, $this->object_id, $property, true );
This is preventing the helper method to return an array => the rank_math/sitemap/include_noindex cannot exclude the pages.

Could you check if this is expected behavior? It would be useful to exclude the noindex pages from the site map with the rank_math/sitemap/include_noindex filter.

Thank you in advance.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer