Single Property Details Page

On the single property page, the following action hooks are used.

rem_property_ribbon

It renders the ribbon on the slider. It’s 2 arguments are below

  1. Property ID
  2. Ribbon Type

Suppose you want to remove the ribbons, you will use the following code in your theme’s functions.php file.

add_action( 'init', 'rem_remove_ribbons' );

function rem_remove_ribbons(){
	global $rem_hk_ob;
	remove_action('rem_property_ribbon', array($rem_hk_ob, 'add_ribbon_with_listings'), 10 );
}

 

rem_single_property_slider

It renders the gallery images slider. It has a single argument that is property ID.

You can remove the slider using the following code in your theme’s functions.php file.

add_action( 'init', 'rem_remove_slider' );

function rem_remove_slider(){
	global $rem_hk_ob;
	remove_action( 'rem_single_property_slider', array($rem_hk_ob, 'single_property_slider' ), 10 );
}

Similarly, you can add additional content before or after the slider using this hook. For example, the following code will display the property ID after the slider.

add_action( 'rem_single_property_slider', 'rem_id_after_slider', 11, 1 );

function rem_id_after_slider($property_id){
	echo $property_id;
}

rem_single_property_contents

It’s the main hook to render all the contents on property page including custom sections. Following are contents rendered through it with the priority.

  1. Property Title => 15
  2. Property Content => 20
  3. Sections => 30
  4. Features => 40
  5. Map => 60
  6. Tags => 70
  7. Edit Property Button => 80

Now, let say you want to move the property title above the slider. First, you will remove it from the contents and then you will add it with the rem_single_property_slider hook increasing its priority.

So, the following code will do the job.

add_action( 'init', 'rem_move_property_title_top' );

function rem_move_property_title_top(){
	global $rem_hk_ob;
	remove_action( 'rem_single_property_contents', array($rem_hk_ob, 'single_property_title' ), 15 );
	add_action( 'rem_single_property_slider', array($rem_hk_ob, 'single_property_title'), 1, 1 );
}

You can also change the positions of the sections by changing the priority. The following code will move the map above property features.

add_action( 'init', 'rem_move_map_above_features' );

function rem_move_map_above_features(){
	global $rem_hk_ob;
	remove_action( 'rem_single_property_contents', array($rem_hk_ob, 'single_property_features' ), 40 );
	add_action( 'rem_single_property_contents', array($rem_hk_ob, 'single_property_features'), 65, 1 );
}

rem_single_property_agent

This hook renders the data in the sidebar. You can use this hook to add your data or to remove the default data. It has a single argument which is the ID of the agent of the current property.

Next rem_single_property_contents