I’m building a news portal where I have few different CPTs (news types). Each CPT has the same ACF field set. I’d like to show an archive of articles coming from all CPTs that have a specific ACF field set. Any hints? Thx.
Do all of these post types have a unique ACF field name (meta_key) that exists for these post types but does not exist for the other post types that you do not want to show?
if the answer is yes
$args = array(
'post_type' => 'any',
'key' => 'field_name',
'compare' => 'EXISTS'
$my_query = new WP_Query($args);