Bulk No Index

#68446
  • Resolved Jay B
    Rank Math free

    Hi, I have been using RankMath for over 6 months now, and want to No Index some 12000 posts on my site. Just wanted to check if there is any way to do a bulk update.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Unfortunately Rank math doesn’t have a feature to change bulk index noindexed posts. Even though you can toggle the index from the Rank Math > Titles & Meta page, these settings will only take effect when creating new posts.

    To workaround this, you can make use of a filter to set all the posts on the post type to index/follow like so:

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

The ticket ‘Bulk No Index’ is closed to new replies.