I have a website where user can refers locations, so each post refers a special location,
How can I call a map in my category-ID.php for all the locations from a special category (showing all the post markers from the category)?
(each category have his own specific form, so it need to call only the ones from one category)
We're saving the Google Map Coordinates in post_meta. So you can get the data from calling the post_meta. I the thing you're trying to do is I guess would be quite tough.
You may include a dropdown or something to choose their location. In this way that would be easier to filter.
Thanks for the answer,
unfortunatly it doesnt solve the issue,
The thing is that by calling the map in the theme :
< ?php echo wpuf_shortcode_map( 'location', $post->ID ); ?>
It loaded the special ID from the post ($post->ID), what I would like is that it can load an array of ID instead of just one, do you think it is possible ?
In case not, how can I extract the latitude and longitude as numbers written in php ?
Thanks in advance,
The way you wrote the code, you have to loop through the $post_ids and fetch the individual post meta for the co-ordinates and store them in a array. Then you've to display those co-ordinates in a map. wpuf_shortcode_map function won't show all those locations in the map, you've to write custom.