Skip to content

Instantly share code, notes, and snippets.

@RiodeJaneiroo
Created June 16, 2020 10:54
Show Gist options
  • Save RiodeJaneiroo/55548e114200b07179bf1fe54fe3a0b6 to your computer and use it in GitHub Desktop.
Save RiodeJaneiroo/55548e114200b07179bf1fe54fe3a0b6 to your computer and use it in GitHub Desktop.
[Yoast change meta tag robots for page] #php #seo #yoast
add_filter( 'wpseo_robots', 'yoast_seo_robots_change' );
function yoast_seo_robots_change( $robots ) {
if (is_page(1496) || is_page(1496) ) {
$robots = "noindex, nofollow";
return $robots;
}
return $robots;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment