I feel like I'm extremely close on this one but the query keeps on showing up empty. Basically, I'm trying to query the custom values between two dates. Records should be returned if the start date is less than the current date and the end date is greater than or equal to the current date:

Can we see what form the value of $current takes?
–
Tom J Nowell♦Sep 4 '12 at 21:49

1

nm saw your reply to sanchos, if this worked, how many posts would you see? What happens if you remove all the other filters like taxonomy etc and just specified the post type and the meta query?
–
Tom J Nowell♦Sep 4 '12 at 22:06

2 Answers
2

Update - it may be supported in a meta_query. I need more information - see below.

You can't do it using a meta_query, it's not supported.

Do you have data in meta_data fields? - WordPress queries will exclude posts where any of the orderby (or meta_query) fields is missing. WordPress adds a join condition to the SQL query to support the orderby or query fields, an inner join (a join which only includes posts with the join field.)

is output when Im not using that query. (this is an example of one post)
–
RobertSep 4 '12 at 23:19

The query you posted references the field 'end_event_date', but in your post data the field is called 'end_date_of_event'. If no post has the field 'end_event_date', no post would be returned. Change the key name and see if it works now.
–
marfarmaSep 5 '12 at 14:03

............................... and the 100 bounty goes to you. Ive been trying to figure this out for two weeks and end_date_of_event was end_event_date... smh. Im sorry for wasting your time lol
–
RobertSep 5 '12 at 14:25

Seeing errors like that in your own code is just hard. Believe me, we've all been there.
–
marfarmaSep 5 '12 at 15:19