Created
October 1, 2014 09:08
-
-
Save jdevalk/0b2ddd13d27cf869a976 to your computer and use it in GitHub Desktop.
Change WP SEO JSON+LD search URL from ?s= to /search/
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
<?php | |
/** | |
* Changes the search slug to /search/ for the JSON+LD output | |
*/ | |
function yst_change_json_ld_search_url() { | |
return trailingslashit( home_url() ) . 'search/{search_term}'; | |
} | |
add_filter( 'wpseo_json_ld_search_url', 'yst_change_json_ld_search_url' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment