29th Nov '22/8 commentsLimit the Number of Posts in a Bricks Query Loop of Relationship TypeSridhar Katakam Updated on 12 Dec 2023 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. This Pro tutorial shows how. Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin: This is a BricksLabs Pro tutorial. For full access login below or create your BricksLabs Pro account Username Password Remember Me Forgot Password Tagged: Bricksbricks/query/runFiltersProQuery LoopSridhar KatakamSridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.Get access to all 633 Bricks code tutorials with BricksLabs Pro
Pro Filtering ACF Repeater Bricks Query Loop by Sub Field ValueWe look into how ACF Repeater rows output by a Bricks query loop can be filtered using the bricks/query/run PHP filter.Read more →Categories: Bricks, Plugins, ProTags: ACF, bricks/query/run
Pro Bricks Query Loop for Top-level Parent Pages with ChildrenIn the Bricks Facebook group, a user asked: Looking for a custom query to output a list of posts in the same hierarchy that the…Read more →Categories: Bricks, ProTags: Nested Queries, Query Loop
Pro Excluding Duplicate Posts from Query Loops in BricksHow to ensure that posts are not duplicated when two query loops are used on the same page.Read more →Categories: Bricks, ProTags: Query Loop
How to Add a Custom Control Field to an Element in BricksIn this tutorial, we'll learn how to add a custom control field to an element and dynamically change a CSS property inside the builder. Introduction…Read more →Categories: Bricks, FreeTags: Filters
Pro YouTube Video Timestamps in BricksThis Pro tutorial provides the steps to output a YouTube video given its ID with custom timestamps and their description text using ACF Pro or…Read more →Categories: Bricks, Plugins, ProTags: ACF Pro, ACF Repeater, Interactions, Loop Index, Meta Box
Pro Parent post Bricks query loopUpdated on 5 Feb 2024 In the BricksLabs Facebook group a user asks: Is there a way to output the data of a parent post…Read more →Categories: Bricks, ProTags: Query Loop
Pro 6 Random Posts from Tag A + 6 Random Posts from Tag B in a Single Bricks Query LoopDisplaying two set of random posts, inside one query loop.Read more →Categories: Bricks, ProTags: Query Loop
Pro Programmatically populating ACF field values in WordPressAn example of how to set the values of a Select-type field with the names and labels of all public post types.Read more →Categories: Plugins, ProTags: ACF, acf/load_field, Filters
Pro Alphabetical Glossary Query Loop in BricksHow to group posts (can be of any post type) by their starting letter in Bricks.Read more →Categories: Bricks, ProTags: Custom Query Type, Nested Queries, Query Loop, Tabs