Support » Plugin: WooCommerce » Disable noindex on certain core pages

  • Resolved cl0ne



    So, I would like to know how to override a default behavior in Woocommerce, which is caused by the following code:

    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' ) ) ) {
    add_action( 'wp_head', 'wc_page_noindex' );

    This code blocks core pages from being detected by search engines. Problem is: my configuration puts the checkout and cart page right on the home page using Woocommerce One Page Checkout plugin. Essentially, this is the most important page on the site and yet because it has a checkout and cart, it is automatically being label “noindex”. The independent checkout page will not be used at all as a result. How can I address this? I do not care if the independent “cart” and “checkout” pages are not seen but I would like the “my account” page to also be indexed as I classify it as an important page for customers.

    Appreciate any help!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.