Reply To: Mashup Popup template

Home Forums MapPress Support Mashup Popup template Reply To: Mashup Popup template

#18322
Chris
Keymaster

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;
}