• Resolved TesterGP

    (@testergp)


    Dear,

    I need to check the number of events that exist and that are later than today and for which the tag name is for example “Party”. If the number is greater than or equal to 1 than I display a custom agenda. If the number is 0 than no agenda is displayed.
    This is my code

    $argsEVENTSte = array(
    'post_type'	=> 'ai1ec_event',
    'post_status' => 'publish',
    'tag' => 'Party',
    'numberposts' => -1,
    'meta_query' => array(
            array(
                'key' => 'ai1ec_start-time',
                'value' => date("Y-m-d"),
                'compare' => '>=',
    	'type' => 'DATE'
    	)
    )
    );
    $numbereventste = count( get_posts( $argsEVENTSte ) );

    I need to know the key name of the start date-time. And later on also from the end date-time. Can you please tell me the key names of the custom post fields start end end date?

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

    The events are pulled from the database table wp_ai1ec_events and the start and end dates are in the fields:

    start
    end

    respectively. Since I am not a developer, I have not studied the php code or functions. I can’t provide you with programming help, but you can submit a feature request by submitting a ticket here:

    https://ideas.time.ly

    Thread Starter TesterGP

    (@testergp)

    OK, thx for your answer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘query on start time and end time’ is closed to new replies.