rem_property_price
This filter returns the formatted price for properties.
Arguments
- Formatted Price [HTML]
- Actual Price [integer]
- Arguments [array]
Display Price on Request Text
Suppose you want to display a Price on Request text instead of the actual price for those properties having price 1, paste the following code in the functions.php file of the theme/child theme will do that.
add_filter('rem_property_price', 'change_price_text', 20, 3); function change_price_text($return, $price, $args){ if ($price == '1') { return 'Price on request'; } else { return $return; } }
Display Price only for Logged In Users
The following code will display Price is Hidden text instead of listing price if the user is not logged in. Paste this code in your child theme’s functions.php file.
add_filter('rem_property_price', 'change_price_text', 20, 3); function change_price_text($return, $price, $args){ if (!is_user_logged_in()) { return 'Price is Hidden'; } else { return $return; } }