Last active
June 19, 2019 20:33
-
-
Save tacoverdo/3e9fec24ebcf33abb111 to your computer and use it in GitHub Desktop.
change_url_googles_ssb.php
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 | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/** | |
* Changes the URL used for the Google Sitelink Search Box functionality in WordPress SEO (Premium) | |
* The returned string must always include {search_term} to indicate where the search term should be used. | |
* | |
* @returns string new searchURL | |
*/ | |
function yoast_change_ssb_search() { | |
return 'http://mysite.com/?search={search_term_string}'; | |
} | |
add_filter('wpseo_json_ld_search_url', 'yoast_change_ssb_search' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment