Here we will create a gallery with images which are added by a ACF repeater like this tiny gallery slider below.
How to start.
First we create the ACF repeater, go to ACF->Fields Groups:
Create a new repeater like this:
And add an image subfield:
The settings for this repeater are here set for posts:
Go to your post and add some images (you can find the repeater at the bottom of your post:
Click on add row and click on add image:
Now lets create the slider:
Add rhe first repeater:
Select the repeater block and add the source:
And set the repeater to slider with one image per slide:
Now add a div to this repeater:
And in this div we add an image:
Set the image source to the repeater:
Now we create another repeater for the gallery (on the same level as the first repeater)
And set the source just like the first repeater, set the slider to 3 items per page.
Now we add an image to the second repeaters (watch out, take the Cwicly image) and set the image source to the repeater:
It looks like this:
And this:
To create interactions between these 2 repeaters, set the sync with (ID) from the first slider with the id from the second.
And set the second repeater to “is navigation”:
Now we create a lightbox with the on click (link) of the div of the first repeater:
Now you can set the sizes, the navigation and the dots to your wishes.
That’s all!
Hey this is really great with details. So my concern with using a repeater it this: I am using something called WP Sheet to mass edit my CPTs etc on my site. So right now with the gallery field it is really straightforward, if i want to move all the galleries for example to another CPT or add them to a new field etc. I can just highlight the entire row and it picked up the entire gallery and copy past. Easy peezy. But is there a way to do a single field with a repeater field? Because I started that and it creates a separate column for each image… which with large galleries can be impossible to do my current workflow. I only have a handful of galleries right now so i could convert them manually but this piece has been holding me up. Also, i dont want myself or my users to have to manually upload each image. Maybe I am missing something?Thank you for creating this site!! I am super excited to review your other tutorials.
Design by Lijn-B
Made with Cwicly
Leave a Reply