February 12, 2014 at 12:57 am #14228
I am trying to create a mash up of my maps to create a mashup.
i have tried the short code in my page template which shows a world map and no POI’s. e.g.<?php echo do_shortcode(‘[mashup]’); ?>
My maps are created from a custom field that is set up in the Geo Settings and is post code.
this generates the maps which i can display individually using the following$result =$wpdb->get_results(“SELECT
foreach( $result as $results )
echo do_shortcode(‘[mappress mapid=”‘.$map_id.'”]’);
How can I use the map id to create a mash up please.February 12, 2014 at 7:03 am #14230
It’s easier to create mashups is by using a category or tag, if that’s a possibility for your site.
If not, to use specific maps, you’ll need to use post ID or page ID – there’s no way to query by map ID.
Or for pages:
[mashup query=”page_id=1,2,3,4″]February 12, 2014 at 9:45 pm #14238
I dont use categories or tags.When the map is created I have a post form gravity forms to which I could add category or tag or post type.
How would I then produce a mash up?February 13, 2014 at 5:30 am #14242
See the documentation for some examples of mashups using queries based on categories and tags.
WordPress has some more here:
As I mentioned above you can also do post IDs, but I think categories or tags might be easier.February 14, 2014 at 2:02 am #14246
Thanks for that.
I tried the following thinking if I could get a straight forewarns mash up I could move from there.:-
<?php echo do_shortcode(‘[mashup query=”p=259,261″]’);?>
which gave me one POI on the map and not two.
The maps are valid as ordinary posts with the maps inserted in the posts and the data is in the posts database.
How to debug/fix?February 14, 2014 at 5:16 am #14253
Sorry, I forgot – the p= query is only for a single post.
You need post__in. Here’s the example from the documentation:
[mashup query=”post__in=3,4,5″]February 18, 2014 at 5:03 am #14277
Thanks Chris, that works.
Can you tell me how the Mash Up query works or point me to the code.
My gravity form gives a post id and this is referenced in the map press posts table so I am wondering if I can amend the query a little.
Thank you.February 19, 2014 at 7:11 am #14285
Hi, you can see the code in mappress_pro.php. The plugin uses the standard WP_Query class to read the posts, then combines the POIs from the maps attached to those posts into a single map.
- You must be logged in to reply to this topic.