Home › Forums › MapPress Support › Mashup Popup template › Reply To: Mashup Popup template
May 17, 2019 at 3:43 am
#18322
Yes, but you would use your calculation to return the value. It would look something like this (this is just pseudo-code – I haven’t tested it):
function myfilter($props, $postid, $poi) {
$price = annonce_detail('annonce_prix');
$html = number_format( $price, 0, ',', ' ' ) . ' € ';
if ( has_term( 'location', 'offre' ) )
$html .= '<small>/ mois</small>';
if ( has_term( 'location-saisonniere', 'offre', $postid ) )
$html .= '<small>/ nuit</small>';
$props['prix'] = $html;
return $props;
}
