Mappress widget – is this possible?

Home Forums MapPress Support Mappress widget – is this possible?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12215
    ojkershaw
    Participant

    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…

    #12220
    Chris
    Keymaster

    Hi,

    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:

    https://codex.wordpress.org/Class_Reference/WP_Query

    #12343
    ojkershaw
    Participant

    Hi 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" ]

    #12348
    Chris
    Keymaster

    Hi,

    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.

     

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.