Being excluded-cat
and excluded-cat-1
the categories you want to exclude from indexing:
add_action('wp_head','AS_exclude_category_from_indexing');
function AS_exclude_category_from_indexing(){
$html="";
if(has_category('excluded-cat') || has_category('excluded-cat-1')){
$html= "<meta name=\"robots\" content=\"noindex,follow\">".PHP_EOL;
}
echo $html;
}