rem_single_property_page_tags
This hook can be used to insert your own content on the single property page after the tags.
Related Properties
Suppose you want to display a Related Properties section at the end of a property page containing 2 related properties.
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_page_tags', 'rem_related_properties', 100, 1 ); function rem_related_properties($property_id){ $type = get_post_meta( $property_id, 'rem_property_type', true ); $sectionData = array( 'title' => 'Related or Similar Properties', 'key' => 'related_properties', ); if ($type != '') { echo '<div class="rem-section-box"><div class="section-title line-style">'; echo rem_render_section_title($sectionData); echo '</div>'; echo do_shortcode( '[rem_list_properties style="2" pagination="disable" posts="2" class="col-sm-6" meta="property_type|'.$type.'"]' ); echo '</div>'; } }
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_page_tags', '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 }