Change dots and commas in price to ' and append ,- at the end
<?php
/**
* Change dots and commas in price to ' and append ,- at the end
*/
add_filter( 'wpsight_property_price', 'custom_property_price' );
function custom_property_price( $price ) {
$sr = get_post_meta(get_the_ID(), '_price_sold_rented', true );
$p = get_post_meta(get_the_ID(), '_price', true );
if(!$sr == 0 or empty($p)) {
return $price;
} else {
return str_replace( ',', '‘', str_replace( '.', '‘', $price .'‚–' ) );
}
}