Carousel with ACF

  • Hi,
    I’m trying to create a slider using the GP Carousel Block and ACF. I can only use the free version of ACF so don’t have access to the gallery field. However, I’ve installed a 3rd party ACF Gallery field plugin which could be a viable alternative: https://wordpress.org/plugins/acf-galerie-4/

    Unfortunately I cannot seem to get the GP Carousel Block to render the images from the field.
    Here are the carousel settings I’ve tried:
    Carousel Block
    Query Type: Post Meta
    Select Post: Current Post
    Meta Key: slider
    Image Block (inside carousel loop item block): {{post_meta key:slider}}

    If I change image block to {{featured}} then it does display the featured image of the post 4 times but obviously thats not the correct images.

    Is what I’m trying to achieve possible?

  • Hello,

    The issue is with how gallery fields store their data rather than anything you’re doing wrong with the carousel settings.

    Gallery fields — including ACF Galerie 4 — save their values as a single serialized PHP array of attachment IDs in the database (e.g. a:3:{i:0;s:3:"123";i:1;s:3:"456";i:2;s:3:"789";}). The carousel’s Post Meta query type isn’t able to unpack that format — it expects to find individual, iterable values, not a single serialized blob.

    ACF Galerie 4 doesn’t store plain attachment IDs in the standard way. The plugin’s own PHP API returns a custom data structure where image URLs are accessed via $gallery['metadata']['thumbnail']['file_url'] — which means it’s even further from being compatible with GB’s post_meta query type than a standard gallery field would be.

    The bottom line is that getting this working without custom PHP isn’t really possible. The most realistic no-ACF-Pro approach would be to build the carousel output manually in a GP Hook Element using functions.php (or Code Snippets) to enqueue the PHP logic — but that’s genuinely custom development territory rather than a support issue.

  • Thank you for the very detailed response, I’ll have to rethink this then.

    Out of interest would a standard Gutenburg Gallery Block work?

  • Hello,

    Unfortunately not — the WordPress Gallery block stores its data as block markup in the post content rather than as individual queryable meta values, so the GB carousel has no way to read from it either.

    For a dynamic image carousel in GB, the options that actually work require ACF Pro — either the native Gallery field (with a small custom dynamic tag) or a Repeater field with an Image sub-field. Without ACF Pro there isn’t a clean no-code path here.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.