Exclude pages from sitemap?
-
Some pages on our site (such as cart, my-account, checkout) are getting a noindex tag from somewhere (not from SEO Framework settings). This actually seems to make sense, as why index pages like that?
However, they are in the sitemap.xml, and Google’s Search Console doesn’t like to be told about them and then find noindex. I can’t find a way to exclude them from the sitemap. Am I missing something?
Thanks!
Edit – I found the filtering method, but it doesn’t seem to work. Should the sitemap be regenerated on the fly each time it is requested? Here’s my filtering:
add_filter( 'the_seo_framework_sitemap_exclude_ids', 'cc_sitemap_excludes' ); function cc_sitemap_excludes() { $ids = array( 5, 6, 7, 35 ); return $ids; }
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Exclude pages from sitemap?’ is closed to new replies.