All-in-One Event Calendar
Need events to expire in a custom WP Loop (1 post)

  1. johnevanofski
    Posted 2 years ago #

    I am using a carousel on my front page to display current events and I'm trying to use a WP Loop, I need the filter by event date so that old events won't show up in the carousel.


    I wanted to use the meta_key and meta_compare parameters, I just need to know what the key is.

    I'm trying to use something like this:

                    $today = date("Ymd")-1;
                    $args = array(
                        'post_type' => 'ai1ec_event'
                        'showposts' => -1,
                        'suppress_filters' => true,
                        'meta_key'  => '???' ,
                        'meta_compare'  => '>=' ,
                        'meta_value'  => $today,
                        'orderby'  => 'meta_value',
                        'order'  => 'ASC'
                    query_posts( $args );?>
    . . .

    I did a query on meta keys and I wasn't able to pull up any for the event date but it must come from somewhere?


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic