Preventing Woocommerce Pages from showing in Yoast’s Sitemap

By default, Woocommerce adds a noindex tags to certain pages. This includes pages that aren’t beneficial to search, such as Cart, My Account, and Checkout. At the same time, Yoast still shows these pages in their sitemap.

In a nutshell, what we get by default is this:

woocommerce cart checkout my account yoast

 

What we want is this:

yoast prevent woocommerce pages showing sitemap

 

 

The following code snippet should help remove those for you:

No Comments

Be the first to start a conversation