I used the code below…is there anything wrong with this approach?
function remove_yoast_robots ( $myfilter ) {
if ( is_search() ) {
return false;
}
return $myfilter;
}
add_filter( 'wpseo_robots', 'remove_yoast_robots' );
-
This reply was modified 6 years, 8 months ago by jinyus.