Removing calls to noindex() and wp_no_robots()
In the general-template.php
file, I have functions (see below – "noindex" "no robots") that are not allowing Google bots to index the website. I am trying to find the code where these functions are used. I looked into many files but I can't seem to find which file is using this code or where these functions are called from.
I need to remove these functions from where they are used in WordPress code. I have tried to remove the code from the general-template.php
file but then it started to give me an error. So, I am pretty sure that I can't just delete them here; I need to remove the functions where they are used in other files of the WordPress code.
Any idea how I can do this?
/**
* Display a noindexmeta tag if required by the blog configuration.
*
* If a blog is marked as not being public then the noindexmeta tag will be
* output to tell web robots not to index the page content. Add this to the wp_head action.
* Typical usage is as a wp_head callback. add_action( 'wp_head', 'noindex' );
*
* @see wp_no_robots
*
* @since 2.1.0
*/
function noindex() {
// If the blog is not public, tell robots to go away.
if ( '0' == get_option('blog_public') )
wp_no_robots();
}
/**
* Display a noindexmeta tag.
*