Last active
June 9, 2016 22:06
-
-
Save jonathan-dejong/b39184dd05ccfd797b5c9d373b532503 to your computer and use it in GitHub Desktop.
Modify search string
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 ugly_search($query) { | |
if( is_search() ) { | |
$org_s = $query->query_vars["s"]; | |
$query->set('s', $org_s . ' extra sträng'); | |
} | |
} | |
add_action('pre_get_posts', 'ugly_search'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment