• Resolved Rosencruez

    (@rosencruez)


    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:

    $frontpageevents='post_type=ai1ec_event&showposts=3&orderby=start&order=ASC&meta_value=yes';
    $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.

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    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.

    Regards

    Richard

    (@richardgirling)

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] Show Upcoming Events Only’ is closed to new replies.