Last active
December 5, 2018 03:40
-
-
Save JoeHana/434cc592d91c2f3502bfb2d5a8872c1e to your computer and use it in GitHub Desktop.
Re-order fields in search form
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 | |
/** | |
* Re-order fields in search form | |
*/ | |
add_filter( 'wpsight_get_search_fields', 'custom_get_search_fields' ); | |
function custom_get_search_fields( $fields ) { | |
$fields['offer']['priority'] = 10; | |
$fields['location']['priority'] = 20; | |
$fields['listing-type']['priority'] = 30; | |
$fields['keyword']['priority'] = 90; | |
$fields['submit']['priority'] = 100; | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment