Last active
May 21, 2016 02:20
-
-
Save kjbrum/3c4370dd3b9426bc5add to your computer and use it in GitHub Desktop.
Disable searching if it isn't needed.
This file contains hidden or 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
<?php | |
// Disable Searching | |
add_action( 'parse_query', function($query){if(is_search())$query->is_404=true;} ); | |
add_filter( 'get_search_form', 'return null' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment