Home › Forums › Add-ons › Repeater Field › Repeater field shortcode? › Reply To: Repeater field shortcode?
I updated the code to run as I mentioned above. You can find it here:
I also forgot to mention that it will parse shortcodes within the repeater rows
[acf_repeater field="my-row" sub_fields="full-name,phone-num"] name: %full-name% [another_shortcode]phone: %phone-num%[/another_shortcode] [/acf_repeater]
Caveat: You can not do nested repeater rows. However you need to you can just duplicate the
add_shortcode and add more shortcode repeaters shortcodes and it will work. There’s probably a much better way to handle unrestricted amount of sub-repeaters but that’s a lot more work and testing for another day
add_shortcode("acf_repeater", "my_acf_repeater"); add_shortcode("acf_sub_repeater", "my_acf_repeater");
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.