POS Only products appear in the Yoast SEO Sitemap
-
WordPress – Version 4.7.3
Yoast SEO – Version 5.5.1
WooCommerce – Version 3.4.1
WooCommerce POS – Version 4.3.5.2I am getting 404 warnings from my Google Webmaster account regarding products I have set to POS Only status. I would expect these products (POS Only) be excluded from the Yoast SEO generated Sitemap or indexed as nofollow but this is not the case.
Has anyone any suggestion on how I can exclude these products from the Sitemap, perhaps could provide me with code for the following…
function sitemap_exclude_post_type( $value, $post_type ) {
if ( $post_type == ‘post_type_product’ ) return true;
}
add_filter( ‘wpseo_sitemap_exclude_post_type’, ‘sitemap_exclude_post_type’, 10, 2 );
- The topic ‘POS Only products appear in the Yoast SEO Sitemap’ is closed to new replies.