Forum Moderators: goodroi
To do this in your header insert this somewhere in the head tags. Before or after the Title tag is fine.
<?php
if (is_archive()){
echo "<meta name=\"robots\" content=\"noindex,follow\">\n";
}
?> This will put noindex on Category, Author and Date based pages. That may be too much. Here [codex.wordpress.org] is a page that shows the different is_ codes you can try.
Question...This accomplished the same thing as the [seologs.com...] plug-in, correct?
I used the following code to archive only the index, page, posts:
<?php if(is_home() ¦¦ is_single() ¦¦ is_page()){
echo "<meta name=\"robots\" content=\"index,follow\">";
} else {
echo "<meta name=\"robots\" content=\"noindex,follow\">";
}?>
which seemed to work fine, then I found the plug-in and that seems to address the issue as well. Your thought on one vs. the other?