Adding content to Bootstrap Modal dynamically with Advanced Custom Fields
-
I’m trying to loop through my custom fields created with Advanced Custom Fields and display an image gallery (using a repeater field) in a modal window. The WordPress installation utilizes Bootstrap and I’m trying to change the ID of the modal window based on the order of the post. First post should display #myModal-1, where the second post should output #myModal-2 etc. This should be replicated in the modal window code accordingly.
For some reason the counter is not working and I have no idea why.
See Pastebin below for relevant code.
https://www.ads-software.com/plugins/advanced-custom-fields/
- The topic ‘Adding content to Bootstrap Modal dynamically with Advanced Custom Fields’ is closed to new replies.