Create A Bootstrap 4 Carousel Slider With ACF Image Repeater
Here is how to create a Bootstrap 4 carousel slider of images with ACF Pro Repeater field in WordPress.
There are a few options in that the Bootstrap carousel can be plain, add navigation and add a caption, 4 examples can be seen below in the demo lower in the post.
Create the ACF Repeater fields for Bootstrap carousel.
Here an image and text field are created, assign the field group to a post or page and populate the repeater rows.
Add the ACF Repeater Bootstrap Carousel Code
https://gist.github.com/neilgee/d4a4c1c3de098cc34cad34208f6158e7#file-carousel-php
https://gist.github.com/neilgee/d4a4c1c3de098cc34cad34208f6158e7#file-carousel-nav-php
https://gist.github.com/neilgee/d4a4c1c3de098cc34cad34208f6158e7#file-carouse-nav-indicators-php
https://gist.github.com/neilgee/d4a4c1c3de098cc34cad34208f6158e7#file-carousel-caption-php
https://gist.github.com/neilgee/d4a4c1c3de098cc34cad34208f6158e7#file-carousel-thumbnails-php
There are 5 code snippets above, expand the links to see the code, they are a plain carousel slider, a slider with navigation and indicators and carousel with text captions, the PHP counter increment variable is used throughout.
Ensure you have unique IDs per slider.
Add more options to the slider either via data attributes or Javascript.