Created
April 5, 2017 02:21
-
-
Save JoeHana/6a856b564b3b0855ec85ac995c84eb80 to your computer and use it in GitHub Desktop.
Show advanced search fields by default
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 | |
/** | |
* Show advanced search fields by default | |
*/ | |
add_filter( 'wpsight_get_advanced_search_fields', 'custom_get_advanced_search_fields', 11 ); | |
function custom_get_advanced_search_fields( $fields ) { | |
$fields_advanced['min']['advanced'] = false; | |
$fields_advanced['max']['advanced'] = false; | |
$fields_advanced['orderby']['advanced'] = false; | |
$fields_advanced['order']['advanced'] = false; | |
$fields_advanced['feature']['advanced'] = false; | |
return $fields; | |
} |
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
/* Hide Advanced Search Button */ | |
.listings-search-advanced-toggle { | |
display: none | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
May I suggest a couple corrections.
replace $fields_advanced with $fields
and for the css to work it has to be more 'specific' to override de default style