All-in-One Event Calendar
[resolved] Show Upcoming Events Only (3 posts)

  1. Rosencruez
    Posted 4 years ago #

    I'm trying to display upcoming events only (so no past events) using the WP_Query() function. I see there is a "wp_ai1ec_events" table in the database and a column named "start" with the start times in yyyy-mm-dd hh:mm:ss format. I can get the current time in the same format using $currentTime = current_time('mysql')

    This is what my query looks like so far:

    $eventquery = new WP_Query($frontpageevents);

    I've tried adding '&start>'.$currentTime to the end of the $frontpageevents declaration, but that didn't work. I was hoping if someone knew how to handle this.


  2. Ula Szczepaniak
    Posted 4 years ago #


    Did you try another way to do this? AI1EC has a nice function get_events_between.
    You can use it simple:

    $events = $ai1ec_calendar_helper->get_events_between( $s_time, $e_time );
    and you set $s_time and $e_time you want it.


  3. Richard
    Posted 4 years ago #

    This post is 2 weeks old and there have been no replies, so I am marking it as 'resolved.'

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All-in-One Event Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic