I’ve a list of events with some custom fields.
Two of these custom fields are “date_start” and “date_end”.
“date_start” is always filled, “date_end” could be empty.
“date_start” and “date_end” values are in the “YYYY-MM-DD” format: this must help sorting and filtering.
I need to get a list of all events that follow these two rules:
(date_start >= today() AND date_end >= NULL) OR (date_end != NULL AND date_end >= today())
I’m not sure yet if I must check for NULL (or “”?) to avoid error messages, but this is not the main issue.
I tried to follow the codex page (http://codex.wordpress.org/Template_Tags/query_posts), but the instruction lost me around the “Multiple Custom Field Handling:” part 🙁