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

  • If the field bustype is a select field then it stores an array of values and you must do a "LIKE" meta query.

    
    ....
    'meta_value' => $metavalue,
    'meta_compare' => 'LIKE'
    ....
    

    This would be event better

    
    ....
    'meta_value' => '"'.$metavalue.'"',
    'meta_compare' => 'LIKE'
    ....
    

    For more information on querying by different types of fields see https://www.advancedcustomfields.com/resources/query-posts-custom-fields/