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 Listing Type Taxonomy Slug | |
*/ | |
add_filter( 'wpsight_rewrite_types_slug', 'custom_rewrite_types_slug', 11 ); | |
function custom_rewrite_types_slug( $slug ) { | |
return 'type'; | |
} |
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 Listing Locations Taxonomy Slug | |
*/ | |
add_filter( 'wpsight_rewrite_loctions_slug', 'custom_rewrite_loctions_slug', 11 ); | |
function custom_rewrite_loctions_slug( $slug ) { | |
return 'location'; | |
} |
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 Listing Post Type Slug | |
*/ | |
add_filter( 'wpsight_rewrite_listings_slug', 'custom_rewrite_listings_slug', 11 ); | |
function custom_rewrite_listings_slug( $slug ) { | |
return 'listing'; | |
} |
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 | |
/** | |
* Make Listing Type Taxonomy hierarchical | |
*/ | |
add_filter( 'wpsight_taxonomy_types_args', 'custom_taxonomy_types_args' ); | |
function custom_taxonomy_types_args( $args ) { | |
$args['hierarchical'] = true; |
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
/** | |
* If the Demo Content Import fails, the following code can be placed to any PHP File | |
* which gets loaded (eg. functions.php), saved, page reloaded and removed. | |
* It will delete the entry in the DB to reset the Demo Content Importer to be able to re-try it. | |
*/ | |
delete_option( 'wpsight_demo_import_step_content' ); | |
delete_option( 'wpsight_demo_import_step_theme-options' ); | |
delete_option( 'wpsight_demo_import_step_widgets-content' ); | |
delete_option( 'wpsight_demo_import_step_custom-options' ); |
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 Advanced Search Fields | |
*/ | |
add_filter( 'wpsight_get_advanced_search_fields', 'custom_get_advanced_search_fields', 11 ); | |
function custom_get_advanced_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 | |
/** | |
* Define custom image sizes for Sylt Theme | |
*/ | |
add_filter( 'wpsight_madrid_image_sizes', 'custom_madrid_image_sizes' ); | |
function custom_madrid_image_sizes( $image_sizes ) { | |
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
/** | |
* Custom Listing Details | |
*/ | |
add_filter( 'wpsight_details', 'custom_details' ); | |
function custom_details( $details ) { | |
$details['details_1']['data'] = array( | |
'' => __( 'n/d', 'wpcasa' ), | |
'10' => '1', |
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
/** | |
* Customize "Offer" Label in Search Form | |
*/ | |
add_filter( 'wpsight_get_search_fields', 'custom_get_search_fields' ); | |
function custom_get_search_fields( $fields ) { | |
$fields['offer']['label'] = __( 'Custom Label', 'wpcasa' ); | |
return $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
/** | |
* Add custom text (from) before price | |
*/ | |
add_filter( 'wpsight_get_listing_price_before', 'custom_get_listing_price_before' ); | |
function custom_get_listing_price_before( $value ) { | |
if( wpsight_get_listing_price_raw() ) | |
$value .= '<small>' . __('from', 'wpcasa' ) . '</small> '; | |