• Resolved ducktoy

    (@ducktoy)


    Hello

    We have many Product tags on our website, so many that they are very bad for our Google crawl budget.

    So I have a question:

    Is it possible with a piece of code to not include tags with less than 5 products in the sitemap?

    In addition, it would also be great if it is possible to give those tag pages a Noindex, and of course, go away if they reach more than 5 products.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @ducktoy

    We understand that you want to set parameters for some of your WooCommerce product tags wherein if it has less than 5 products, not to include it in the sitemap and to set it to ‘noindex’.

    We do know that with the Yoast SEO plugin, if you set a particular post or page to ‘not show in the search results’, it will have a ‘noindex’ tag and will be removed from the sitemap accordingly. This also applies to product tags. You can learn more about it here – https://yoast.com/help/how-do-i-noindex-urls/

    However, as for setting the parameters that you’d like, you might have to develop custom code and use a filter for this. This is already outside our scope of support, but we would like to refer you to our developer documentation and you can modify the plugin in a way that would suit your needs – https://developer.yoast.com/

    Sa?a

    (@stodorovic)

    Yes, it’s possible. You can use the filter wpseo_sitemap_exclude_term_ids or wpseo_sitemap_entry for sitemaps and wpseo_robots for tag pages. WP_Term object has property count.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exclude little Tags from Sitemap’ is closed to new replies.