Home › Forums › General Issues › Help retrieving with ACF to define posts shown – Using a Shortcode › Reply To: Help retrieving with ACF to define posts shown – Using a Shortcode
Hi John
I also tried using the simple select value example on the docs too, and that returned absolutely nothing too, which is a bit bizzare.
I found another post from you on this forum relating to select fields, so tried the following for my code:
$options = array(
'post_type' => $type,
'order' => $order,
'orderby' => $orderby,
'posts_per_page' => $posts,
'color' => $color,
'class' => $class,
'fabric' => $fabric,
'category_name' => $category,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'bustype',
'value' => 'buyer',
'compare' => 'LIKE'
),
array(
'key' => 'bustype',
'value' => 'service',
'compare' => 'LIKE'
),
array(
'key' => 'bustype',
'value' => 'otherbus',
'compare' => 'LIKE'
)
)
Something is now returned, but it’s just 4 posts of the 10 I have live, and they are not related to any of the above ACF really as the results are mixed. The above contains all the select values, so all the posts should be shown technically.
It does show though that the code somewhere along the line for ACF I am using is not finding or producing the right results.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.