• Resolved marksu2017

    (@marksu2017)


    Dear all,

    how can I select the details of listings I want shown on a listings overview? Ideally, this would work similar to e.g. the offer="rent" tag within the [wpsight_listings] shortcode, but I have not found that option. By default, number of bathrooms, number of sleeping rooms and plot size are shown.

    Also, if I add a detail “balcony” via code snippets, I’d like this custom detail shown also.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter marksu2017

    (@marksu2017)

    After digging through github, I believe there is a snippet available:

    <?php
    /**
     *	Change details of the listing summary
     *
     *	@param	string	$listing_summary
     *	@param	integer	$post_id
     *	@param	array	$details
     *	@param	bool	$formatted
     */
    add_filter( 'wpsight_get_listing_summary', 'wpsight_listing_summary_details', 10, 4 );
    function wpsight_listing_summary_details( $listing_summary, $post_id, $details, $formatted ) {
        // Define set of details
        $details = array( 'details_1', 'details_2', 'details_4', 'details_5' );
        // Create summary
        $listing_summary = wpsight_get_listing_details( $post_id, $details, $formatted );
        return $listing_summary;
    }
    

    Also note that you probably need to set your custom detail’s “dashboard” attribute to “true” and give it a name under Dashboard => WPCasa => Settings.

    Plugin Author WPSight

    (@wpsight)

    Hello,

    glad that you could found the code and solve this by yourself. Just to add, the dashboard attribute is actually for the WPCasa Dashboard plugin and tells if a custom detail should also get displayed in the WPCasa Dashboard’s Frontend Editor or not. But yes, you need to give your custom detail a name from within the WPCasa settings.

    All the best

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Select detail information displayed on listings overview’ is closed to new replies.