Problem: I have a map View that shows markers and a list of results. If I change the category filter, the distance values disappear for the next set of results.
Solution: In this case, the map marker shortcode should be placed inside the wpv-loop tags, and repeated for each wpv-item. Use the wpv-post-id shortcode to make the marker ID dynamic.
<!-- wpv-loop-start --> <div class="mapparisultati">[wpv-map-render map_id="map-19" map_height="450" map_type_control="off" cluster="on" spiderfy="on" street_view_control="off" marker_icon="//www.radiogoupon.com/wp-content/plugins/toolset-maps/resources/images/markers/Shop-2.png" style_json="//www.radiogoupon.com/wp-content/plugins/toolset-maps/resources/json/Standard.json"][/wpv-map-render] </div> <wpv-loop wrap="3" pad="true"> [wpv-item index=1] [wpv-map-marker map_id='map-19' marker_id='marker-[wpv-post-id]' marker_title='[wpv-post-title]' marker_field='wpcf-localizzazione']<a href="#[wpv-post-id]">[wpv-post-title] [toolset-maps-distance-value origin_source='url_param' postmeta='wpcf-localizzazione'] km da te<br>[types field='localizzazione'][/types]</a>[/wpv-map-marker] <div class="riga-cou"> <div class="col-sm-4">[wpv-post-body view_template="loop-item-in-vedi-sconti-su-mappa-test"]</div> [wpv-item index=other] [wpv-map-marker map_id='map-19' marker_id='marker-[wpv-post-id]' marker_title='[wpv-post-title]' marker_field='wpcf-localizzazione']<a href="#[wpv-post-id]">[wpv-post-title] [toolset-maps-distance-value origin_source='url_param' postmeta='wpcf-localizzazione'] km da te<br>[types field='localizzazione'][/types]</a>[/wpv-map-marker] <div class="col-sm-4">[wpv-post-body view_template="loop-item-in-vedi-sconti-su-mappa-test"]</div> [wpv-item index=3] [wpv-map-marker map_id='map-19' marker_id='marker-[wpv-post-id]' marker_title='[wpv-post-title]' marker_field='wpcf-localizzazione']<a href="#[wpv-post-id]">[wpv-post-title] [toolset-maps-distance-value origin_source='url_param' postmeta='wpcf-localizzazione'] km da te<br>[types field='localizzazione'][/types]</a>[/wpv-map-marker] <div class="col-sm-4">[wpv-post-body view_template="loop-item-in-vedi-sconti-su-mappa-test"]</div> </div> <div class="riga-cou"> [wpv-item index=pad] <div class="col-sm-4"></div> [wpv-item index=pad-last] <div class="col-sm-4"></div> </div> </wpv-loop> <!-- wpv-loop-end -->
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 8 replies, has 2 voices.
Last updated by 6 years ago.
Assisted by: Christian Cox.