Answer the question
In order to leave comments, you need to log in
WP function stopped working, how to make it work?
I've been using this feature on my site for over a year.
function mayak_meta_robots () {
if (is_archive() or is_category() or is_feed () or is_author() or is_date() or is_day() or is_month() or is_year() or is_tag() or is_tax() or is_attachment() or is_paged() or is_search())
{
echo "".'<meta name="robots" content="noindex,nofollow" />'."\n";
}
}
add_action('wp_head', 'mayak_meta_robots');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question