• Resolved javasworks

    (@javasworks)


    Hi, how to query the active event?
    is this argument enough:

    $args = array(
        'post_type'       => 'event',
        'post_status'     => 'publish',
        'posts_per_page'  => -1,
        'meta_query'      => [
            'key'       => '_start_ts',
            'value'     => current_time('timestamp'),
            'compare'   => '>=', 'type'=>'numeric'
        ],
        'orderby'     => 'meta_value_num',
        'order'       => 'ASC',
        'meta_key'    => '_start_ts',
        'meta_value'  => current_time('timestamp'),
        'meta_value_num' => current_time('timestamp'),
        'meta_compare' => '>='
    );

    https://wordpress.org/plugins/events-manager/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get active event’ is closed to new replies.