Hello,
I need to prevent google from indexing specific categories with all their posts , and I found this code that, obviously, worked for many people. The code needs to be placed into header.php file between <head> and </head> tags. Here's the code
<?php if ( is_category('3') || in_category('3') ) {
echo '<meta name="robots" content="noindex">';
}
However, when I did it, the home page returned an error. It sounds like no other codes are allowed between the two tags in Atahualpa.
Is there another way to implement this code? Or, how do I indicate in Atahualpa which categories are noindex? I need to exclude 4 categories with all the posts from being indexed. Or, is there a way to place a meta tag that would prevent Google from indexing specific categories?
Thanks a lot for your help.
Vince