Home › Forums › MapPress Support › Mashup Popup template › Reply To: Mashup Popup template
May 15, 2019 at 5:45 am
#18316
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