Skip to content

Instantly share code, notes, and snippets.

@JoeHana
Created November 30, 2017 15:43
Show Gist options
  • Save JoeHana/730d76f6bd680517add491031a8b7d6a to your computer and use it in GitHub Desktop.
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)
<?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