-
I have written a plugin to put in our meta name=”robots” tag, there’s some strange logic we need. So I am trying to suppress the robots tag that rankmath is automatically inserting. The closest I’ve come is adding this to rank-math.php in my theme dir:
add_filter( ‘rank_math/frontend/robots’, function( $robots ) {
unset($robots[‘index’]);
unset($robots[‘follow’]);
return $robots;
});however, that leaves in the others like max-snippet max-video-preview, etc… I’ve tried to remove them using the same filter as well as the rank_math/snippet/rich_snippet_article_entity filter, but that had no effect. Is there a way to just completely suppress the meta robots tag?
The ticket ‘remove meta robots tag’ is closed to new replies.