This Pro tutorial provides the steps to implement an accordion using Alpine.js in WordPress that pulls the values of sub fields of a Meta Box group for a dynamic FAQ accordion.
Install Meta Box and Meta Box AIO plugins.
Create a new field group having a group-type of field with two sub fields or import this.
In this example,
faq group field having
question text-type sub field and
answer wysiwyg-type field.
Set the field group to appear on your desired post type, in this example:
Edit your Page(s) and populate the field group.
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account
The ‘Live Demo’ link https://bricks.wpdemo.dev/accordion/ is broken
Works fine here. Can you share a screenshot of how it looks on your end?
What’s the advantage of this accordion vs. the one built into Bricks Builder?
I do not think it is possible to 1) use sub fields inside a field group 2) change transition duration with the built-in Accordion element.
I tried to look at one of the references (https://wpdevdesign.com/how-to-display-sub-fields-of-a-meta-box-group/) and did not have access. I am a pro member of Brickslabs, but not of wpdevdesign.