Hello,
Thanks for contacting us and we regret the inconvenience caused.
Unfortunately, we do not 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 work around this, you can make use of a filter to set all the posts on the post type to index 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;
});
Please make sure to replace “your_post_type_name_here” with the actual post type name.
Let us know how that goes.
Thanks.
Hello again,
It didn’t help me, I added this code to my functions.php.
In the end I tried to update the meta_value from rank_math_robots in phpMyadmin and it seems like this solved my issue for now.
Thank you for your reply and your help.
Best regards,
Ivana
Hello,
We’re glad that you got that sorted.
If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.