Created
July 24, 2018 16:44
-
-
Save mariusghitulescu/5d1f9ac225ebfd4abc11e4d1f8ed0a93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Noindex all posts in a category */ | |
add_filter("wpseo_robots", function($robots) { | |
if (is_single() && in_category(array(100))) { | |
return "noindex,follow"; | |
} | |
return $robots; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment