I have use the query like this:
$args = array('post_type' => 'event', 'meta_query' => array(array(
'key' => $current_date,
'value' => array('_event_start_date','_event_end_date'),
'compare' => 'BETWEEN',
'type' => 'DATE')));
but it give me blank result where as i have record between start and end date..!!!
]]>value
needs to be the two values you want to compare between.
Can you describe what you’re trying to achieve? Might make it easier to offer solutions.
]]>I have many events with its start and end date like
event 1 = 2017-11-08 to 2017-11-11
event 2 = 2017-11-09 to 2017-11-10
event 3 = 2017-11-06 to 2017-11-07
as I have run one loop from
2017-11-05 to 2017-11-15
now suppose I will reach at date 2017-11-09 than, I have to display records which has this date: so my output event will be :
event 1
event 2