Support

Account

Home Forums Front-end Issues get all posts in custom post type by ACF field value Reply To: get all posts in custom post type by ACF field value

  • OK I think it actually needs the ‘array’, like this:

    'meta_query' => array(
            'key' => 'program_id',
            'value' => '5317',
            'compare' => 'LIKE'
    
               ),

    You may or may not need the single-quotes around the value (‘5317’) it depends on how that custom field is setup (the type of field) and you could also try using ‘=’ in place of ‘LIKE’ but LIKE should work too.