Forum Replies Created
-
AuthorPosts
-
No, that’s not possible. But if you structure your maps by creating a single POI per post then you can:
– display the POIs together on a mashup map
– go directly to an individual post to see its (single) POI.Hi,
I do have it on my development list to reduce the memory usage of the plugin, but for now you will need to limit the number of locations displayed.
Try using posts_per_page to restrict them, for example posts_per_page=500.
Hi,
Ok, I understand now. Unfortunately WordPress doesn’t support joining two different queries together with an OR condition like that.
One workaround might be to assign all of the posts you want to a specific category or tag, so you could query them as a single unit. For example, you could assign the posts of interest to tag ‘map’ and then query by that tag.
If you can come up with a query that will work to select those posts, I can explain how to map them:
http://codex.wordpress.org/Class_Reference/WP_QueryHi,
I’m assuming you’re testing by printing wp_query directly with the PHP code I gave you, rather than trying to use MapPress, is that correct?
You combined the two queries correctly and they looked fine to me.
Of course, the combined query would only return events that are in the given categories AND have end_date < 20130618. Have you checked that you have posts that meet ALL of those criteria? Or are you instead trying to get the results for events in the given categories OR end_date < 20130618?
Hi,
For a category you can use “cat=mycat”, or several other category queries. There are some examples in the MapPress documentation and here:
http://codex.wordpress.org/Class_Reference/WP_QueryHi,
Yes, custom post types should work – but I thought you were saying you didn’t get any query results when you combine a post_type and orderby in the query?
If there are no results, try the code and see what WordPress is returning (without using MapPress). You can post the results here and I’ll take a look if that helps.
Hi,
I’ve emailed you the file. If you don’t receive it please send an email with the contact form so I can reply.
However, if the query isn’t returning any results there won’t be anything to map – you’ll need to get the query working first.
The SQL looked OK, so I would suggest checking that the correct term IDs are being used (30 and 31), as well as the post date, status, etc. of the posts you’re trying to select.
Here’s a link to the codex as well, in case there’s a clue there:
http://codex.wordpress.org/Class_Reference/WP_QueryHi Clive,
I know what you mean, TinyMCE adds those tags. Are you able to just switch to the HTML tab and enter your text there?
Hi,
1. Google seems to often size the infowindow incorrectly (with scrollbars). Here are a few things to try:
– Use a bigger map (the infowindow size is limited to about 1/3 of the map size)
– Specify image sizes (in the img tag, specify width and height)
– Use the MapPress ‘infobox’ instead of the infowindow in the MapPress settings. The infobox should expand correctly, and it can be sized using CSS.2. MapPress ‘filters’ are like WordPress ‘filters’, they’re hooks for your own code. Filtering by location type isn’t supported by MapPress, although you can use PHP to display a map using the current WordPress search category or tags.
3. That’s not possible, but you can do this: create 1 post per POI and insert a map with just a single location. Use a mashup to display all of the posts together; when the user clicks on a POI, go to its post, where the user will see a map of just that location.
4. There’s a bug in 2.40.3 that is preventing shadow display. It’ll be fixed in the next version of the plugin, but it’s probably a moot point because Google has announced that in the next version of their maps API they won’t support shadows at all. Please see here for info about their up-coming ‘visual refresh’:
https://developers.google.com/maps/documentation/javascript/basics
Hi,
I tested your query in my system and I found the problem – WordPress is replacing the “<" with "<" when it appears in the shortcode. Since < is invalid, it then uses "=" for the comparison. I'll provide a workaround in MapPress for this issue in the next version. If you'd like an immediate fix, send me an email and I'll send you an updated version of the file that needs to be changed.
Hi,
Assign the pages to a specific category, then use a mashup query for that category with post_type=page.
There are some examples queries by category and post type in the documentation, but let me know if that doesn’t help.
Hi,
I’m not sure if this is a problem with the query or a bug. To narrow it down, could you try the following:
1. Deactivate all of your other plugins and switch to the 2012 theme for a moment. Does the full query work? If so, a plugin or the theme is interfering with the WordPress query.
2. Add the code below to your theme file to check the query results without using MapPress. If they are still incorrect, there is a WordPress bug or something is wrong with the query itself:
<?php $wpq = new WP_Query('category_name=lachlan-catchment,rivers-creeks&post_type=events&meta_key=event_end_date&meta_value=20130618&meta_compare=<'); print_r($wpq); ?>If the results for #2 are correct, then it’s a bug in MapPress and I’ll be happy to trace it for you – please send me an email with the contact form and provide an administrator login to the blog.
Hi,
I don’t see why the custom post type would affect the query orderby.
If the query is invalid (for example, wrong post type) WordPress would revert to a default query posts by date descending, so double-check the post type you’re using is valid.
You can also try this code (add it to a theme file) – it should show what posts WordPress is selecting without using MapPress at all:
<?php $wpq = new WP_Query('post_type=uk&orderby=date&order=desc'); print_r($wpq); ?>Finally, try disabling your other plugins and switching to a standard theme for a moment. Some themes/plugins modify the WordPress query.
Hi Clive,
I don’t think that’ll be a problem because the folder name isn’t hardcoded into the plugin, so give it a try.
Hi Tom,
The easiest way is probably to use the ‘orderby’ parameter in your query (then you don’t need a filter).
See here for some examples:
http://codex.wordpress.org/Class_Reference/WP_QueryFor example to order posts by date, descending, this should work:
[mashup query="orderby=date&order=DESC"] -
AuthorPosts
