Support

Account

Home Forums Feedback Сustom pagination in the custom field Reply To: Сustom pagination in the custom field

  • Hey,
    I really didn’t get the question, but rather than filtering it in the query, you can use this.

    $posts = get_posts(array(
        'post_type'			=> 'letters',
        'numberposts'	    => -1,
    ));
    foreach($posts as $post)
    {
    if(get_field('letter_sent', $post->ID) == '2019')
    {
    //your code
    }
    }

    Also the meta_key is not same when acf saves it. Try enabling the Custom fields option in the Screen options. You will get the idea how acf saves the custom fields.