Build an Accordion Block with ACF PRO
Channel: WP Engine Builders
Date: 2022-12-20

Accordions can be an excellent way to group related information while allowing users to toggle (show and hide) their content interactively. However, there are some considerations to keep in mind. We’ll dive into how to create an accessible accordion block using ACF PRO’s Repeater field.

We'll go over the following:

✔ How to scaffold a new block plugin with the @wordpress/create-block package
✔ Set up and organize ACF PRO Repeater fields
✔ Organize and register ACF PRO fields within your plugin
✔ Hook up the front-end JavaScript and CSS to incorporate an accessible experience

Final accordion block: https://github.com/colorful-tones/acf-accordion-block
Original post: https://wpengine.com/builders/accordion-block-acf-fields/
A lot more great resources: https://wpengine.com/builders/