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 features in search form | |
*/ | |
add_filter( 'wpsight_get_advanced_search_fields', 'custom_get_advanced_search_fields' ); | |
function custom_get_advanced_search_fields( $fields ) { | |
$fields['feature']['data']['number'] = 20; |
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 baths and beds in Listing Details | |
*/ | |
add_filter( 'wpsight_details', 'custom_wpsight_details' ); | |
function custom_wpsight_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
add_action( 'wp_head', function() { | |
if( ! current_user_can( 'manage_options' ) ) | |
echo '<style>.only-admin {display: none;}</style>'; | |
}); |
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 'Details 1' and 'Details 2' from property search form in WPCasa | |
* | |
* @param array Registered search fields | |
* @uses wpsight_details() | |
* @return array | |
*/ | |
add_filter( 'wpsight_get_search_fields', 'custom_wpsight_get_search_fields' ); |
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 | |
/** | |
* Set Featured Image & Title as default option in WPCasa Oslo | |
*/ | |
add_filter( 'wpsight_oslo_meta_boxes_header_listings', 'custom_wpsight_oslo_meta_boxes_header_listings' ); | |
function custom_wpsight_oslo_meta_boxes_header_listings( $fields ) { | |
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 | |
/** | |
* Add custom taxonomy to search form | |
*/ | |
add_filter( 'wpsight_get_search_fields', 'custom_wpsight_get_search_fields' ); | |
function custom_wpsight_get_search_fields( $fields ) { | |
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 |
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' from property search form in WPCasa | |
* for Twitter's Bootstrap-based themes (WPCasa Madrid, WPCasa Oslo, WPCasa London) | |
* | |
* @param array Registered search fields | |
* @uses wpsight_details() | |
* @return array | |
*/ | |
add_filter( 'wpsight_get_search_fields', 'wpsight_get_search_fields_offer_remove' ); |
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' from property search form in WPCasa | |
* | |
* @param array Registered search fields | |
* @uses wpsight_details() | |
* @return array | |
*/ | |
add_filter( 'wpsight_get_search_fields', 'wpsight_get_search_fields_offer_remove' ); |
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 | |
/** | |
* Set specific offer as default in listing price metabox | |
*/ | |
add_filter( 'wpsight_meta_box_listing_price_fields', 'custom_wpsight_meta_box_listing_price_fields', 10 ); | |
function custom_wpsight_meta_box_listing_price_fields( $fields ) { | |
$fields['offer']['default'] = 'rent'; | |
return $fields; |
NewerOlder