As the previous code I posted didnt work for the OP, clutching at straws, we can try to obtain the same outcome using [`get_the_category`][1] As the OP stated he was using YOAST, i'll wrap this function into the YOAST hook for robots. add_filter('wpseo_robots', 'yoast_no_home_noindex', 999); function yoast_no_home_noindex($string= "") { $term_id = get_the_category( $post->ID ); if($term_id = 92) { $string= "index,follow"; } return $string; } Same again, just drop this into your themes functions file. [1]: https://developer.wordpress.org/reference/functions/get_the_category/