Home › Forums › ACF PRO › Create shortcode from a Repeater Field › Reply To: Create shortcode from a Repeater Field
Hi @angel.meraz
You can tackle this by breaking it up into 2 parts:
1. Ignore the shortcode and write the code to loop through the repeater fields and output the accordions.
http://www.advancedcustomfields.com/resources/have_rows/
2. Pull out that code and place it in a function within your functions.php file. Then tweak it to work as a shortcode:
http://codex.wordpress.org/Shortcode_API
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.