Created
November 16, 2012 18:12
-
-
Save ericandrewlewis/4089552 to your computer and use it in GitHub Desktop.
Redirect
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
add_action( 'init', 'baja_check_search_box' ); | |
function baja_check_search_box() { | |
if ( empty( $_POST['search_box'] ) ) | |
return; | |
wp_redirect( site_url( '$_POST['region'] . '/' . $_POST['post-type'] ) ); | |
die; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment