I have a site in wordpress with some categories for example "our-clients", "portfolio", "articles" but the category our clients should not appear in Google results if someone can help thank you
I have a site in wordpress with some categories for example "our-clients", "portfolio", "articles" but the category our clients should not appear in Google results if someone can help thank you
Another option, and I believe it is simpler, is to add a file called robots.txt to the root of the site.
Within this file place:
User-agent: *
Disallow: /nossos-clientes
This tells all robots not to index the link our-clients and everything below it. You can specify a single link if you need, by putting the entire url, eg:
User-agent: *
Disallow: /nossos-clientes/meu-cliente
In the above case, only "my-client" would not be indexed and the "our-client" link would.
Recommended for WordPress sites:
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
# Seus bloqueios personalizados #
Disallow: /nossos-clientes
You can try using the Yoast plugin and apply the code and remove only the category at hand:
Install the plugin: link
Add the code in your functions.php:
function sitemap_exclude_taxonomy( $value, $taxonomy ) {
if ( $taxonomy == 'nossos-clientes') return true;
}
add_filter( 'wpseo_sitemap_exclude_taxonomy', 'sitemap_exclude_taxonomy', 10, 2 );