query on start time and end time
-
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)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘query on start time and end time’ is closed to new replies.