rem_single_property_contents

This hook can be used to insert your own contents on the single property page.

Related Properties

Suppose you want to display a Related Properties section at the end of a property page containing 3 related properties in a grid.

You will have to paste the following shortcode inside the functions.php file of your theme/child theme and it will do the job.

add_action( 'rem_single_property_contents', 'rem_related_properties', 100, 1 );

function rem_related_properties($property_id){
	$type = get_post_meta( $property_id, 'rem_property_type', true );

	if ($type != '') {
		echo '<div class="section-title line-style"><h3 class="title">Related Properties</h3></div>';
		echo do_shortcode( '[rem_list_properties style="3" pagination="disable" posts="3" class="col-sm-4" meta="property_type|'.$type.'"]' );
	}
}

Things you need to know here are Priority and the Relation of properties with the current property.

We’re using Property Type as the relation and priority 100 to display it at the end, you can change these to your needs.

Property Inquiry Form

The following code will display a contact form 7 under the properties in a separate section.

add_action( 'rem_single_property_contents', 'rem_single_property_form', 100, 1 );
function rem_single_property_form($property_id){ ?>
        <div class="wrap-map rem-section-box">
            <div class="section-title line-style">
                <?php rem_render_section_title( __( 'Ask for Details', 'real-estate-manager' ), ''); ?>
            </div>
            <div class="contact-form-wrapper">
                <?php echo do_shortcode( '[contact-form-7 id="1859" title="Contact form 1"]' ); ?>
            </div>
        </div>
    <?php
}