Support

Account

Home Forums General Issues Query between dates using Date Picker fields Reply To: Query between dates using Date Picker fields

  • $query_args = array (
    ‘post_type’ => $post_types,
    ‘post_status’ => ‘publish’,
    ‘no_found_rows’ => 1,
    ‘post__not_in’ => explode(‘,’, $params[‘exclude’]),
    ‘order’ => ‘ASC’,
    ‘meta_query’ => array(
    ‘relation’ => ‘OR’,
    array(
    ‘key’ => ‘date_of_birth’,
    ‘compare’ => ‘=’,
    ‘value’ => $today,
    ),
    array(
    ‘key’ => ‘date_of_death’,
    ‘compare’ => ‘=’,
    ‘value’ => $today,
    )
    ),
    );

    Can u help me Current date match with either date of birth or either date of death.
    Above query not working no one post display.
    I need either date of birth or Date of death Date match with current date and display all posts. I m near by.