-
Hi there,
Managing a fairly new WooCommerce store with ~1900 products. Many of the products are “children” of a grouped product parent, however, as the products were imported in bulk we’ve used a conditional around one of Rank Math’s robots filters to make those child entries noindex:add_filter( 'rank_math/frontend/robots', function( $robots ) { global $post, $product; if ( has_term( 'exclude-from-search', 'product_visibility' ) || has_term( 'exclude-from-catalog', 'product_visibility' ) ) { $robots['index'] = 'noindex'; $robots['follow'] = 'nofollow'; } return $robots;
The issue we’re facing is the filter doesn’t also remove those products from the sitemap, so we’re now generating “submitted URL marked ‘noindex'” errors in Search Console.
Aside from editing each of the child products directly in the dashboard (ugh!) which DOES remove the entries from the sitemap, is there a way for us to force exclude those noindexed entries from the sitemap? Another filter, or method to the same end?
Thanks for your insight!
The ticket ‘Noindexed WooCommerce products still in sitemap’ is closed to new replies.