Created
November 30, 2017 15:43
-
-
Save JoeHana/730d76f6bd680517add491031a8b7d6a to your computer and use it in GitHub Desktop.
Remove offer field and re-set spaces for remaining fields (for WPCasa Bahia)
This file contains hidden or 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 | |
/** | |
* Remove offer field and re-set spaces for remaining fields (for WPCasa Bahia) | |
*/ | |
add_filter( 'wpsight_get_search_fields', 'custom_wpsight_bahia_get_search_field_widths' ); | |
function custom_wpsight_bahia_get_search_field_widths( $fields ) { | |
// Unset offer | |
unset( $fields['offer'] ); | |
// Get listing details | |
$details = wpsight_details(); | |
$details_1 = $details['details_1']['id']; | |
$details_2 = $details['details_2']['id']; | |
$fields['location']['class'] = '4u 12u$(medium)'; | |
$fields['listing-type']['class'] = '4u 12u$(medium)'; | |
$fields[ $details_1 ]['class'] = '2u 6u(medium)'; | |
$fields[ $details_2 ]['class'] = '2u 6u$(medium)'; | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment