Reply To: Mashup Popup template

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

#18316
Chris
Keymaster

    I’m not sure if it’s clear, but PHP code can’t be used for calculation in the template itself.  The templates use JavaScript, and they only execute when a popup is displayed.

    So, using has_term() in the template won’t do anything useful.  Instead, you need to do the calculations for each post using the mappress_poi_props filter.  The results are then passed to the template for display using the poi.props array.

    There’s an example of using the filter to pass a custom value to the template here in the MapPress documentation:

    https://mappresspro.com/mappress-documentation/#toc-mappress-templating