Have you mapped one of our dynamic pages to the home page in page settings?
We have code in place to noindex those.
/**
* Disable search engines indexing core, dynamic, cart/checkout pages.
*
* @since 3.2.0
*/
function wc_page_noindex() {
if ( is_page( wc_get_page_id( 'cart' ) ) || is_page( wc_get_page_id( 'checkout' ) ) || is_page( wc_get_page_id( 'myaccount' ) ) ) {
wp_no_robots();
}
}
add_action( 'wp_head', 'wc_page_noindex' );
Thanks, @mikejolley
No, I have not mapped dynamic woocommerce pages to the home page – I think so – I have never done this.
However, I made a test and changed home page to shop and the metatag noindex vanished.
So, the problem might be in home page tweaks.
I’m using divi builder for my home page, checked all of the internal linking, every divi modul that has something to do with woocomerce and… nothing 🙁
Is it possible that divi has some sort of conflict with newest woocommerce? Before updating everything was ok.
Can you do a quick test/change and find out?
What test are you talking about?
I’ve already changed homepage for a moment to shop and there was no noindex metatag.
I mean’t test with another theme.
Changing theme did nothing…
however I’ve done something else just few minutes ago.
Copied all layout from my homepage and create another, new page. Then I choose new one as the homepage and… it worked.
No more noindex on my site code.
Do not really know what is the reason for that.
thanks for the effort, @mikejolley
Hi,
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.