28th Nov '22
/
8 comments

Outputting Only the First ACF Repeater Row in Bricks

Updated on 12 Dec 2023

In the Bricks Facebook group a user asks:

How can I display only the first entry from an ACF repeater?

This can be done using the bricks/query/result filter through which all query types go through. This enables us to modify the array that the loop iterates through and restrict it to just the first one, in this case.

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 632 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

How to hide/remove the Block Element from the Bricks Builder

How to hide/remove the Block Element from the Bricks Builder

Don't like the new Block element in Bricks? Just copy/paste the following code into your child theme's functions.php. By the way, It's a terrible idea…
Categories:
Tags:
Pro
How to Modify Products Element Query in Bricks to Output Child Products

How to Modify Products Element Query in Bricks to Output Child Products

This Pro tutorial provides the steps to limit WooCommerce products output by Bricks' Products element on single product pages to only the children of the…
Pro
How to Inject a Different Type of Post in Bricks Query Loop

How to Inject a Different Type of Post in Bricks Query Loop

Updated on 26 Aug 2024 A user asks: Hello, I'd like to inject a CPT post card inside of a Bricks query loop of a different CPT…
Pro
Inserting Random Ad Between Posts in Bricks

Inserting Random Ad Between Posts in Bricks

How to insert random ads (post type) in between regular posts on the blog page.
Categories: