skip to Main Content
< All Articles
Print

rem_ribbon_text

This filter is responsible for rendering the text of the ribbon

Arguments

  1. Text to Display [string]
  2. Property ID [integer]

Example

Suppose you want to add a ribbon text Sold to those properties which have their Property Status set to Sold, paste the following code inside the functions.php file of your theme.

add_filter( 'rem_ribbon_text', 'rem_custom_ribbon', 10, 2 );

function rem_custom_ribbon($text_to_display, $property_id){
	if (get_post_meta( $property_id, 'rem_property_status', true ) == 'Sold') {
		return 'Sold';
	}
}

 

Quick Navigation
Back To Top