Created
July 3, 2018 16:37
-
-
Save lynt-smitka/d3a8611ed9792dc5f38a8a20ff0e2511 to your computer and use it in GitHub Desktop.
disable robots on search archive
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
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