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

Get access to all 526 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Custom Function for ACF Link Field

Custom Function for ACF Link Field

How to output the label of an ACF link field through Dynamic Data.
Categories:
Tags:
Pro
ACF Date Field Value Custom Format in Bricks

ACF Date Field Value Custom Format in Bricks

In the Bricks forum, a user asks: Hi there, I am setting up an events calendar using bricks. In some circumstances I would like to…
Categories:
Tags:
Pro
ACF Post Object Query Loop inside a Posts Query Loop in Bricks

ACF Post Object Query Loop inside a Posts Query Loop in Bricks

How to loop through a CPT and within each post, output a list of related posts.
Categories: