Home › Forums › General Issues › Whats the value of a filled field in Query? › Reply To: Whats the value of a filled field in Query?
That doesn’t make any diffrence at all. Probably my fault because my code isn’t right, but could you give me a hint on my code down under:
<?php query_posts(array('post_type' => 'referenser', 'posts_per_page' => '2', 'orderby' => 'rand', 'meta_query' => array( array('key' => 'recension', 'compare' => 'exists')))); while ( have_posts() ) : the_post(); ?>
The field I want to check if it’s field is recension. If it’s not filled it should not query these posts.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.