Support

Account

Home Forums ACF PRO Filter By Year

Helping

Filter By Year

  • Hi,
    I’d like to filter my posts using get_posts and meta_query and a custom date field. How do I return all posts where the custom date field is in 2020?

    Thank you.

  • 
    'meta_query' => array(
      array(
        'key' => 'date_field_name',
        'value' => 20200000,
        'type' => 'NUMERIC',
        'compare' => '>'
      )
    )
    
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Filter By Year’ is closed to new replies.