Mashup infowindow loading error

Home Forums MapPress Support Mashup infowindow loading error

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10314
    geoffg87
    Participant

    Hey Chris,

    Thanks again for a great plugin.

    I’m having a hard time with my mashups in 2.38.5 Beta pro. I’m running WooCommerce plugin/Wootique theme and trying to post a mashup of all my products with mappress on the landing page. I’ve been successful setting up an individual map with infowindow on every product page, however the landing page mashup yields only the following in the body of the infowindow for each product page:

    [mappress mapid=”###”]

    The custom marker images and the HTML linked title of markers both work fine in the mashup.

     

    The shortcode I’m using is:

    [mashup show=”query” show_query=”post_type=product”]

    I’ve tried duplicating the product page maps as posts and amending the shortcode to

    [mashup show=”query” show_query=”post_type=post”]

    In this case the markers fail to show up altogether.

     

    I’ve tried deactivating WooCommerce however all the content becomes inaccessable without reactivating. Is there any other way to circumvent this issue? I’ve tried with both public and private publishing settings.

    Much appreciated,

    Geoff

    #10332
    Chris
    Keymaster

    Hi Geoff,

    A URL might help so I can see what you mean, but I think your first query is the right one (assuming your post type is ‘product’).

    For the infowindow problem: by default MapPress will show the post excerpt for each post.  The default WP excerpt suppresses shortcodes, so you’d never see the ‘mashup’ in the infoWindow.  I’m guessing the Woo theme includes its own excerpt function that doesn’t work the same way.

    Yo might take a look at the Woo forums to see if there are some tips about how to modify their excerpt function.

    Here’s are some other things that might help:

    1) You could use an explicit post excerpt for each post.  That might work, although it also depends on the Woo excerpt function.  Then you can control exactly what shows in the infoWindow – for example, you could choose not to include the [mappress] short code.

    2) You can modify the Woo excerpt function or override it to suppress the shortcode and show some portion of your post content instead.

    3) You can use the MapPress excerpt filter: ‘mappress_poi_excerpt’.  You can add it to your functions.php.  For example:

    function my_excerpt($html, $postid) {
      $post = get_post($postid);
      return $post->post_content;
    }
    add_filter('mappress_poi_excerpt', 'my_excerpt', 10, 2);

    4) You can use the mashup option marker_link=’false’.  Then the mashup will show the POIs exactly as they were saved in each map, but it won’t link the POIs to the underlying posts.  Unfortunately, I’m guessing that’s not what you want to do.

     

    #11698
    geoffg87
    Participant

    Thanks Chris. I left this project for a while and when I updated to the latest mappress, I no longer had this issue.

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