Hello, when I try to use ACF Gallery in two places on same page I encounter strange behavior: like images showing only one gallery or showing in one post and not showing in other with same template applied, also preview images are not showing.
Custom query:
$agf = get_field("acfmygallery");
if (!empty($agf)) {
return [
'post_type' => 'attachment',
'post_mime_type' => 'image',
'post_status' => 'inherit',
'orderby' => 'post__in',
'post__in' => $agf,
'posts_per_page' => 4,
];
} else {
return [ ];
}
Acf gallery field is set to id’s and images dynamic data to {post_id}.
As soon as same images appear in two separate queries it seems to bug out, but if i add offset so different images are displayed in both queries it works (but not in builder itself)