epl_property_icons

When this action is run it outputs the listing bedroom, bathroom, parking icons on the single and loop templates.

Because it is an action it can be overridden with your own function.

add_action('epl_property_icons','epl_property_icons');

How it works is in two steps.

function epl_get_property_icons() {
	global $property;
	return $property->get_property_bed().
		$property->get_property_bath().
		$property->get_property_parking().
		$property->get_property_air_conditioning().
		$property->get_property_pool();
}
function epl_property_icons() {
	echo epl_get_property_icons();
}
add_action('epl_property_icons','epl_property_icons');

If you wanted to replace the default icons with list item text values you can re-build the above functions and output a list.

Firstly disable the default action

remove_action('epl_property_icons','epl_property_icons');

Next you can define your own function and hook it into the default epl_property_icons action.

NOTE: Easy Property Listings icon functions have some operators that can save you some time.

  • get_property_bed
  • get_property_bath
  • get_property_parking
  • get_property_air_conditioning
  • get_property_pool
function my_epl_property_icons() {
	global $property;
	echo '<ul>';
	echo $property->get_property_bed( 'l' ).
		$property->get_property_bath( 'l' ).
		$property->get_property_parking( 'l' ).
		$property->get_property_air_conditioning( 'l' ).
		$property->get_property_pool( 'l' );
	echo '</ul>';
}
add_action( 'epl_property_icons' , 'my_epl_property_icons' );

The above will change your icons to output a list.

  • 3 bed
  • 2 bath
  • 4 Parking Spaces