WordPress.org

Ready to get started?Download WordPress

Forums

WP Geo
[resolved] Bizarre Archive Page Map and Widget Issue (4 posts)

  1. jamblo
    Member
    Posted 1 year ago #

    Hello there

    Bit of an odd issue I've discovered when using the following code in a custom post type archive:

    <?php if ( isset($wpgeo) ) $wpgeo->categoryMap(); ?>

    Placed in or outside the loop*. This code ONLY works when the Contextual Map widget is added to a sidebar (that isn't even called into the site, just sat there in the admin panel).

    When the widget isn't in the sidebar the map isn't there, just an empty box.

    Not sure why this would be?

    *If I place it INSIDE the loop, I get the map once and an extra empty map rectangle for every post in the archive. Very odd.

    http://wordpress.org/extend/plugins/wp-geo/

  2. Ben Huson
    Member
    Plugin Author

    Posted 1 year ago #

    Please try this with the latest development version.
    You can download the zip file on this page:
    https://github.com/benhuson/WP-Geo

    In the WP Geo settings you'll need to ensure the following "Show Maps On" checkboxes are selected:

    1. Your Custom Post Type
    2. The "Posts archive/home page"

    This ensures the map will load load on the post archive page for your CPT.

    There is also a filter 'wpgeo_show_maps' in this version so that you can force the maps to load (or not) on pages by returning true or false.

  3. jamblo
    Member
    Posted 1 year ago #

    All sorted after the recent update, by the way.

    Keep going with this plug-in, Ben, its proving damn useful!

  4. Ben Huson
    Member
    Plugin Author

    Posted 1 year ago #

    Cheers.

    Big update coming soon to use Google Maps v3 as their version 2 API will expire in a few months.

    If you are able to test the development version that would be great.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic