Can't remove noindex meta tag from head

Bit of a strange one. One of my clients site is showing meta name='robots' content='noindex,follow' / in the head. The Search Engine Visibility checkbox is unchecked.

I've tried activating 2019 theme and deactivating all plugins and still the tag shows.

Never encountered this before. Any ideas?

Topic noindex Wordpress

Category Web


To switch from noindex to index from inside a template:

    <?php 
        global $wp_filter;
        foreach($wp_filter['wpseo_robots_array']->callbacks[10] as $k => $v){
            $robots = $v['function'];
        }
        remove_filter( 'wpseo_robots_array', $robots );
    ?>

see: https://github.com/Yoast/wordpress-seo/blob/f6719d2e5d6eb173ab6a9ca63093b422582d66be/src/integrations/front-end/indexing-controls.php#L53

Or, much easier:

update_option('blog_public', 1);

Check to make sure the blog_public option in the options table is set to 1. If that looks right, make sure nothing is adding that tag via the wp_head action. Also make sure this isn't being set by any plugins. This is common for SEO plugins.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.