I have simple question.
Is it possible to get repeater field values via AJAX?
I have repeater field which carries image fields and single line text fields(for img caption).
Let’s say I have 18 images and I want to display five images each time by hitting ‘Load’ button somewhere in my HTML.
Any help or helpful topic or link appreciated.
Thanks
Yes, it is possible. You would need to pass the post ID to your function so that it could get the next item. Along with which you want to get.
A better choice, I think, than ajax would be to add it with just JavaScript. You could create a script that swaps the image and then using wp_localize_script()
https://codex.wordpress.org/Function_Reference/wp_localize_script you can add information about all of the images.
Hi @nori2tae did you come up with something? Would be nice to see how you managed to do this.