Skip to content

Instantly share code, notes, and snippets.

@lukecav
Created February 24, 2016 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukecav/7de2f731d14618f1702e to your computer and use it in GitHub Desktop.
Save lukecav/7de2f731d14618f1702e to your computer and use it in GitHub Desktop.
Yoast SEO - Meta Robots Index Fix
add_filter('wpseo_robots', 'yoast_no_home_noindex', 999);
function yoast_no_home_noindex($string= "") {
if (!is_singular('position')) {
$string= "index,follow";
}
return $string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment