Support

Account

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.