Plugin Author
Reüel
(@pronamic_reuel)
Instead of using the shortcode, you could use the pronamic_google_maps_mashup function in your template and pass the IDs of the posts, like this:
<?php
pronamic_google_maps_mashup(
array(
'post__in' => array( 1, 2, 3 ),
),
array(
'width' => 600,
'height' => 600,
)
);
?>
Wouldn’t that hard-code certain posts into the map display, though? I want the map display to dynamically update when the filters are changed, and I don’t have any way to predict which combination of filters a visitor will use. I need a way to have the plugin 1) determine what is being currently displayed on the page, and 2) display those same posts on the map.
Plugin Author
Reüel
(@pronamic_reuel)
The filters on the page require a page refresh, so there should be a way to get the IDs of the displayed posts during page load. These are the IDs you need to dynamically insert in the pronamic_google_maps_mashup function. So it’s not hard-coding the IDs but rather getting the IDs of the displayed filtered posts. Unfortunately, I don’t know how this filtering is done exactly and as such cannot help you getting the IDs. My starting point would be the documentation of the used filtering plugin 🙂
Gotcha — thanks for clarifying. I appreciate your pointing me in the right direction! I’ll circle back and update this once I’ve found a resolution in case others are trying to do the same thing.
Plugin Author
Reüel
(@pronamic_reuel)
You’re welcome! Please let us know if you we’re able to solve this.