Reply To: Mashup Popup template

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

#18335
monsieurgraphiste
Participant

    Hi Chris,

    Thanks for the updated code.

    I’m always having trouble displaying price.

    I returns “ARRAY” value for $price.

    here is the updated function :

    function myfilter($props, $postid, $poi) {
    $price = get_post_meta( $postid, ‘annonce_prix’ );
    $html = $price;
    $html .= ‘ €’;
    if ( has_term( ‘location’, ‘offre’, $postid ) )
    $html .= ‘<small> / mois</small>’;
    if ( has_term( ‘location-saisonniere’, ‘offre’, $postid ) )
    $html .= ‘<small> / nuit</small>’;
    $props[‘prix’] = $html;
    return $props;

    }

    Mashup : <span class=”price label label-warning”>{{{poi.props.prix}}}</span>

    Thanks for your help