Home › Forums › MapPress Support › Mappress widget – is this possible?
Tagged: mappress widget
- This topic has 3 replies, 2 voices, and was last updated 13 years, 3 months ago by
Chris.
-
AuthorPosts
-
April 11, 2013 at 8:59 pm #12215
Hi there,
I have created a map for a page (not post), which I would like to present in miniature in the widget on blog posts.
Is there a way to do this? I’m afraid I’m pretty green when it comes to WP coding, and can’t see that a post query will do it.
Many thanks in advance…
April 12, 2013 at 3:28 am #12220Hi,
I think you can just enter the ID of the page in the widget query like this:
page_id=1234
Here’s a link to the query documentation from WordPress if it helps:
April 24, 2013 at 12:42 am #12343Hi Chris,
Thanks for your reply.
Using the page_id and pagename queries produces an alert: AJAX Error {“status”:”OK”,”data”:{“pois”:[],”poiList”:””},”output”:””}
I also have tried to get the widget to work by putting the map’s shortcode (below) in a text widget and adding the line “add_filter(‘widget_text’, ‘do_shortcode’);” to the theme’s function.php. This method has very nearly worked, except that the map is not rendering quite right. The bottom 40px or so are cut off and there is blank space at the top. Do you know what might cause this error and how it could be fixed?
Many thanks in advance.
[mappress mapid="1" width="100%" height="250" center="30.0,-96.0" zoom="3" streetViewControl="false" mapTypeControl="false" draggable="false" zoomControl="false" ]April 24, 2013 at 10:14 am #12348Hi,
I tried just setting the widget to ‘custom query’ and entering this in the input below ‘custom query’ (where 35403 is the ID of a page):
page_id=35403
That works for me, so I’m guessing the AJAX issue is something specific to your site. Try deactivating all ofyour other plugins and switching to the 2012 theme to rule out the most common sources of AJAX errors. Some other suggestions are here:
http://mappresspro.com/mappress-faq
If that doesn’t help, please send a URL and a login to your blog (use the contact form) and I’ll see if I can spot the problem.
I’ve never tried the add_filter approach myself but the padding sounds like a CSS problem. As an alternative, you could use do_shortcode() directly into the template’s sidebar.php file.
-
AuthorPosts
- You must be logged in to reply to this topic.
