WordPress.org

Support

Support » Plugins and Hacks » WP Geo » [Resolved] Sidebar Widget Map not showing new Locations

[Resolved] Sidebar Widget Map not showing new Locations

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Ben Huson

    @husobj

    Which widget are you using?

    The Recent Locations widget has a field for the maximum number of markers to show.
    The Category Map should show all posts from the current category (note, on a post page, if a post is in multiple categories it will just use the first category it finds).

    This is the Category Map Widget but it doesnt show all posts from this category.

    In my second category is only one marker: http://www.rhodes-deutschland.de/reiseberichte/australien but every post has a geo location attached (see posts)

    Plugin Author Ben Huson

    @husobj

    Hmm, not sure why…

    Are any of those posts assigned to multiple categories?

    Hi Ben,
    no, those posts where only in one category which was a subcategory.

    I have just tried to assign one category as top level, but the map is still not showing all markers 🙁

    It seems that there is kind of a hardcoded limit, that causes new posts doesn’t appear in the map… I have no clue :-/

    Hello Ben

    I’ve got the exact same problem like seokai.

    When i was in Switzerland and wrote some posts, everything was just fine and the posts were showing up on the category map. Now i’m in New Zealand and the new posts from here won’t show up.

    I think there is maybe a problem with negative latitude numbers, cause if i enter a location above the equator, everything works like a charm, but e.g. in Christchurch, the post map works, but the categeory-map won’t show the post.

    Works:
    Latitude: 25.799891
    Longitude: 112.500000

    Don’t work:
    Latitude: -43.961191
    Longitude: 171.738281

    Hope this helps resolve the issue.

    Cheers!

    Oh this is a good hint!
    Looks like this could be the problem 🙂

    At my blog there are also all positive Latitude posts shown,
    but none below the equator.

    The recent posts widget works like a charm, but not on the category widget.

    Plugin Author Ben Huson

    @husobj

    Thanks for helping to diagnose the issue.
    I’ll investigate the cause.

    Are you both running the latest version of WP Geo?

    yep I updated to Version 3.2.7.2

    yes, i updated to the newest version yesterday

    Hey Ben

    I had a rainy day and looked at this a bit deeper and i might found the problem 🙂

    File: wp-geo/widgets/category-map.php, Line: ~51
    $posts = get_posts( array(
    ‘numberposts’ => -1,
    ‘meta_key’ => WPGEO_LATITUDE_META,
    ‘meta_value’ => 0,
    ‘meta_compare’ => ‘>’,
    ‘category’ => $post_cat_id
    ) );

    It seems that you look for the latitude to be greater than 0, but in our case the latitude is below 0 and therefore wouldn’t be loaded. I now temporarly fixed it by changing the meta_compare value to ‘!=’ and it works like a charm 🙂

    Hope this helps you fix the issue.

    Plugin Author Ben Huson

    @husobj

    Thanks chrigu, that should fix it.
    I would also set:

    'meta_value' => '',

    Just is case you had a point at 0 latitude.

    Plugin Author Ben Huson

    @husobj

    I’ll release this as another update later this week.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] Sidebar Widget Map not showing new Locations’ is closed to new replies.
Skip to toolbar