Sorting ACF Repeater Query by Sub Field in Bricks

This Pro tutorial shows how the rows of a ACF Repeater can be sorted alphabetically by the value of one of its sub fields when using Bricks.

Repeater being populated for a Page:

Before implementing the tutorial:

After:

Set up the field group as shown earlier.

Edit the singular template for your post type to which you have attached the field group with Bricks.

Copy and paste the Section's JSON from here.

Add the following in child theme's functions.php or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to 390+ Bricks code tutorials with BricksLabs Pro