[ad_1]
Hello i’m working on a website using elementor pro + ACF. I have create a custom post type (CPT1) with ACF object field that take another CPT2 as values. I would like to display on my CPT1 page all CPT2 linked. **How can I used Custom Query to display this?** I tried to write this but still not working
“`
add_action(‘elementor/query/13600’, function ($query) {
$query->set(‘post_type’, [‘CPT2’]);
$meta_query[] = [
‘post__in’ => get_field([‘cpt1_field_for_cpt2’]),
];
$query->set(‘meta_query’, $meta_query);
});
“`
