Change meta robots WP

Asked

Viewed 179 times

2

Colleagues.

I took a project of which was developed in WP. Unfortunately I do not know touch in WP, but I would like to change the line:

<meta name='robots' content='noindex,nofollow' />

Inside the header.php file has the line:

wp_head();

I realized that it is within it that is the meta, but when I searched in functions.php, I did not find this function.

It has its own theme and the version is 3.3.2. I know it is an old version, but in March we plan to change site.

1 answer

2

In WP references has the following functions:

See that the second link has this:

add_action( 'wp_head', 'noindex' );

So if that adds, to remove I think it’s something like:

remove_action('wp_head', 'noindex');

And if you want to add your <meta> customized, should be something like:

function metaindexexemplo() {
     //Escreva seu meta customizado aqui
     echo '<meta ....>';
}

add_action('wp_head', 'metaindexexemplo');

Here is a related answer that explains well:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.