Event map shortcode not showing future event

WordPress Event Management, Calendars & Registration Forums General Question Event map shortcode not showing future event

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 1 week, 4 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #40286

    I have an event map shortcode as the following:

    [event_map width=”100%” height=”1000px” showpastevents=”false” numberposts=”50″ event_start_before=”+365″]

    However it is not showing an event in February 18 – 20, 2022. Why? Is there hardcoded logic that limits future events?

    As you see I even tried to add the parameter event_start_before=”+365″ to force it to show all future events within a year.

    Thanks for your help,

    Andy Burns

    Hi Andy,

    I’ve tried this, and it should show future events. I assume you have fewer than 50 event dates before February 18th.

    There are defaults, but no hard-coded logic. But note that the shortcode will retrieve the next 50 event dates, that start before a year’s time. It will then only show those events which have a venue with a location associated. So the map might not show 50 events.

    Stephen Harris

    Very odd. I can confirm this event is within a year and has a venue and map is only showing 6 events currently.

    I don’t know how to debug further.

    Andy Burns

    Hi Andy,

    On line 446 of event-organiser-pro/includes/shortcodes.php you can add the line:

        error_log("\nvenue map: $event->ID / $event->occurrence_id at $venue_id", 3,  WP_CONTENT_DIR . '/debug.log');

    so it should read:

    foreach( $events as $event ){
        $venue_id = (int) eo_get_venue( $event->ID );
        error_log("\nvenue map: $event->ID / $event->occurrence_id at $venue_id", 3,  WP_CONTENT_DIR . '/debug.log');
        if( $venue_id ){

    Then in your wp-config.php you can add the lines

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);

    and then view the event map shortcode. You should find a file debug.log in your WP_CONTENT directory with the event ID and occurrence ID of the events that matched the query, along with their venue ID.

    Do the logs show more than 6 events? Is the event you’re interested in, in those logs? Does the list contain 50 events? If so, and your event is not in them, try increasing that number.

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.