Limit the Number of Posts in a Bricks Query Loop of Type Meta Box Relationship

Bricks Query Loop popup does not have a control for setting the number of posts to be output when the query type is a non-standard one like ACF Repeater, ACF Relationship, Meta Box Relationship.

But as shown in the earlier Outputting Only the First ACF Repeater Row in Bricks tutorial, we can use the bricks/query/run filter to limit the number of items returned.

This Pro tutorial shows how.

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 all 250+ Bricks code tutorials with BricksLabs Pro