Bulk index/noindex edit

#83368
  • Resolved Asianuts
    Rank Math free

    Hello,
    I understand that there is no possibility to bulk edit the tag noindex in RankMath.

    I was palying around with a plugin called “Custom Field Bulk Editor” and tried to change the rank_math_robots custom field with noindex /index as i need. However it seems that the change is not happening. the field seems to be edited however when opening the post/product/page I can not see that the noindex is marked and active.

    do I need to keep a certain syntax like “noindex”or [“noindex”] or something like that?
    could you give me some tips that can speed my quest?

    Thanks a lot.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    The following is the filter we use to change robots meta to noindex by code. You try and use the same variables with your plugin to modify the robots meta:

    
    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
         global $post;
            $robots['index'] = "noindex";
    	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 1 replies (of 1 total)

The ticket ‘Bulk index/noindex edit’ is closed to new replies.