Display posts with a start OR end date later than current date

Edit:

I believe my comments below are still valid, but I suspect part of the problem is the

'relation' => 'OR',

This should be ‘AND’ (it’s default value,so it can be removed) to ensure that it only returns posts which satisfy both conditions. Currently it will return events that start, or end, after yesterday. In effect, this returns all events that end yesterday, or after.

Of course this may still only be part of the problem…


I can’t see anything wrong with the query itself, but the string representation of your events’ dates will cause query problems (without examples it’s hard to say if this is the problem). If you are going to sort by a string representation of dates rather than a timestamp, the format m/d/Y won’t sort properly:

01/01/2012 occurs after, but appears before

11/01/1012

for instance! The format Y/m/d will work.