I’m trying to get the Jcycle2’s progressive loading script to work with my ACF fields.
Problem is, the progressive loading script is with JSON, and i dont know how to implement my php into that.
From the Jcycle2 website:
<div class="cycle-slideshow auto"
data-cycle-fx=scrollHorz
data-cycle-timeout=2000
data-cycle-caption=".caption1"
data-cycle-caption-template="{{slideNum}} / 9"
data-cycle-loader=true
data-cycle-progressive="#images"
>
<!-- only one image declared in markup -->
<img src="http://malsup.github.io/images/beach1.jpg">
<!--
JSON array of slides to be loaded progressively,
nested inside a script block. The script block does not need
to be inslide the slideshow container, it can be anywhere on the
page. Note the type on the script tag.
-->
<script id="images" type="text/cycle">
[
"<img src='http://malsup.github.io/images/beach2.jpg'>",
"<img src='http://malsup.github.io/images/beach3.jpg'>",
...
"<img src='http://malsup.github.io/images/beach9.jpg'>"
]
</script>
</div>
What I would ideally want is that the <script>
part becomes a list of my images from my ACF repeater. Is this something possible?