WordPress.org

Ready to get started?Download WordPress

Forums

WP Geo
[resolved] Sidebar Widget Map not showing new Locations (13 posts)

  1. seokai
    Member
    Posted 1 year ago #

    Hey guys,

    I really love your plugin and use it on my travel blog.

    It worked great from the beginning, but after more than 75 posts or so on one of the word trip categories:
    See example here
    there are no new locations shown in the widget map.

    The big map above the content displays the location correctly, but not the widget :-/

    Is this a bug? May anybody help me?

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

  2. Ben Huson
    Member
    Plugin Author

    Posted 1 year ago #

    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).

  3. seokai
    Member
    Posted 1 year ago #

    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)

  4. Ben Huson
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm, not sure why...

    Are any of those posts assigned to multiple categories?

  5. seokai
    Member
    Posted 1 year ago #

    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 :-/

  6. chrigu
    Member
    Posted 1 year ago #

    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!

  7. seokai
    Member
    Posted 1 year ago #

    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.

  8. Ben Huson
    Member
    Plugin Author

    Posted 1 year ago #

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

    Are you both running the latest version of WP Geo?

  9. seokai
    Member
    Posted 1 year ago #

    yep I updated to Version 3.2.7.2

  10. chrigu
    Member
    Posted 1 year ago #

    yes, i updated to the newest version yesterday

  11. chrigu
    Member
    Posted 1 year ago #

    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.

  12. Ben Huson
    Member
    Plugin Author

    Posted 1 year ago #

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

    'meta_value' => '',

    Just is case you had a point at 0 latitude.

  13. Ben Huson
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic