Skip to content

Instantly share code, notes, and snippets.

<?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 ) {
<?php
/**
* Custom number of beds and baths
*/
add_filter( 'wpsight_standard_details', 'custom_standard_details', 20 );
function custom_standard_details( $details ) {
// Beds
@JoeHana
JoeHana / themeshift-functions.php
Created August 8, 2013 00:28
Replace price with custom field
<?php
/**
* Replace price with custom field
*/
add_filter( 'ts_currency_price', 'custom_property_price' );
function custom_property_price( $price ) {
@JoeHana
JoeHana / wpcasa-functions.php
Last active December 19, 2015 18:09
Exclude sold/rented listings from main loop, except from listing category pages and single view
<?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() )