Completely hide WooCommerce products from shop, product search and WordPress search

Hidden Woo Products Showing in search

You can hide a WooCommerce product from the shop page and product search by choosing ‘Hidden’ in the ‘Catalog visibility’ options from the Publish metabox on a product page in the backend. This is good and it hides the product as advertised from the shop and product search results but the product is still visible…

Read More

Set noindex nofollow on posts from specific category using Yoast WordPress SEO

Wordpress Seo Noindex Certain Posts

Using the Yoast WordPress SEO filter wpseo_robots filter you can set posts from a specific category to have the meta tag set with noindex/nofollow. add_filter( ‘wpseo_robots’, ‘yoast_seo_robots_remove_single’ ); /** * Set certain posts to noindex nofollow */ function yoast_seo_robots_remove_single( $robots ) { if ( is_single() && has_term( ‘uncategorized’, ‘category’ ) ) { return ‘noindex,nofollow’; }…

Read More