Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
disable robots on search archive
function lynt_add_meta() {
if( is_search() ) {
echo "<meta name=\"robots\" content=\"noindex, follow\" />\n";
add_action( 'wp_head', 'lynt_add_meta' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.