I need to display a list of current tasks. Each task has a custom post_type and a start date and end date.
Can someone tell me how to modify my query so it will pick up any tasks that have a start date in the past and an end date in the future? (There's another meta_key named 'end_date')
Here's my query:
$todays_date = time(); $args = array ('post_type' => 'tasks', 'meta_key' => 'start_date', 'meta_compare' => '>', 'meta_value' => $todays_date, 'orderby' => 'meta_value' ); $tasks = get_posts($args);
The problem with the query above is that it's showing tasks that in the future, but haven't started yet.