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 | |
/** | |
* Only top level locations | |
* in search form | |
*/ | |
add_filter( 'wpsight_search_form_details', 'custom_search_form_details', 100 ); | |
function custom_search_form_details( $details ) { | |
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 | |
/** | |
* Custom number of beds and baths | |
*/ | |
add_filter( 'wpsight_standard_details', 'custom_standard_details', 20 ); | |
function custom_standard_details( $details ) { | |
// Beds |
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 | |
/** | |
* Replace price with custom field | |
*/ | |
add_filter( 'ts_currency_price', 'custom_property_price' ); | |
function custom_property_price( $price ) { |
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 | |
/** | |
* Exclude sold/rented listings | |
*/ | |
add_filter( 'pre_get_posts', 'wpsight_exclude_sold_rented' ); | |
function wpsight_exclude_sold_rented( $query ) { | |
if( is_admin() || is_tax( 'listing-category' ) || is_singular() ) |