no index product woocommerce

#40206
  • Resolved Emanuele De Luca
    Rank Math free

    I had put the woocommerce products noindex, but I changed my mind, now when I put them indexed the command is not saved and all noindex still remain, does this mean that I have to do them one at a time? Help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    I did a lot of tests but I think there is a bug, if I uninstall it and put yoast they return indexed, when I install rank math I see them noindex

    Thanks.

    Todd
    Rank Math free

    Hi EMmanuele,

    Thanks for getting in touch with us.

    When you use the noindex option in Rank Math – all the products created from that moment on are marked as noindex. If you change your mind in the future, you can mark the products as index in the future but the products created before that point would still be marked as noindex. You will need to mark them as indexable manually or you can ask us for a custom and we would love to provide that to you.

    yes I would like them all to be indexed again, how can we do it?

    Hello,

    Thank you for contacting Rank Math today.

    You can use the following code in your theme’s functions.php file to set all product post types to index:

    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
         if(is_product()){
            $robots['index'] = 'index';
            $robots['follow'] = 'follow';
            return $robots;
         }
    	return $robots;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘no index product woocommerce’ is closed to new replies.