Home › Forums › MapPress Support › Mashup Popup template › Reply To: Mashup Popup template
May 22, 2019 at 4:26 am
#18329
Participant
Hi Chris,
Thanks for your feedback,
php function number_format doesn’t work it returns no value.
Here is my new code.
function myfilter($props, $postid, $poi) {
$html .= ‘<span class=”price label label-warning”>’;
$price = get_post_meta( $postid, ‘annonce_prix’ );
$html .= $price .’ €’;
if ( has_term( ‘location’, ‘offre’, $postid ) )
$html .= ‘<small>/ mois</small>’;
if ( has_term( ‘location-saisonniere’, ‘offre’, $postid ) )
$html .= ‘<small>/ nuit</small>’;
$html .= ‘</span>’;
$props[‘prix’] = $html;
return $props;
}
Now it returns array for $price value & not displaying HTML tags
Do you have an idea of the problem ?
Many thanks for your help.