• Hi,

    I was wondering how we can add more meta boxes under ‘Additional Details’ in the back-end of a Listing Page.
    By default Home Summary, Kitchen Summary, Living Room and Master Suite display under Additional Features via the Details tab and Schools & Neighbourhood display in a separate tab.

    I recently purchased the Classical Single Listing Template and would like to add some further details and tabs.

    I tried modifying this section of code located in single-listing.php, which I’m using in my Child Theme.

    <h6 class="label"><?php _e("Bathrooms", 'wp_listings'); ?></h6>
    <p class="value"><?php echo do_shortcode(get_post_meta( $post->ID, '_listing_bathrooms', true)); ?></p>

    Adding ‘Bathrooms Summary’, but I see this is echoing a shortcode in the plugins core.

    Anyway you could point me in the right direction?

    https://wordpress.org/plugins/wp-listings/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi ,
    You would add in two files, the following.

    1) file: listing-features-metabox.php
    // bathrooms
    echo ‘<div style=”width: 90%; float: left;”>’;

    printf( __( ‘<p><label>Bathrooms (allows shortcodes):<textarea name=”wp_listings[_listing_bathrooms]” rows=”3″ cols=”18″ style=”%s”>%s</textarea></label></p>’, ‘wp_listings’ ), ‘width: 99%;’, htmlentities( get_post_meta( $post->ID, ‘_listing_bathrooms’, true) ) );

    echo ‘</div><br style=”clear: both;” />’;

    2) file: single-listing.php
    <h6 class=”label”><?php _e(“Bathroom Summary”, ‘wp_listings’); ?></h6>
    <p class=”value”><?php echo do_shortcode(get_post_meta( $post->ID, ‘_listing_bathrooms’, true)); ?></p>

    Cheers,
    Ashitsak

    You may visit my web here:
    http://www.thaipropertydd.com

    Thread Starter Tom.Nunn

    (@tomnunn)

    Hi Ashitsak,

    Thanks for this, however I can not seem to get the metabox to appear in the backend.

    Is this all the code you added?

    Tom

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modifying/Adding to Additional Details/Features’ is closed to new replies.