Query and Compare Two meta_values from Two Different meta_keys
-
I would like to query the results for posts that have two meta_keys of start_date and finish_date.
I would like to compare these dates for results of upcoming, current and past posts. I can use the WP_Query() class to get the upcoming and past results, but can I use if to get the current posts results, or will I need to use the $wpdb object to get those results?
Im using the following comparisons to get my results
if upcoming – start_date < today
if current – start_date > today && finish_date < today
if past – finish_date > todayThanks,
Jesse
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query and Compare Two meta_values from Two Different meta_keys’ is closed to new replies.