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 Events grouped by months within years based on event date custom field valueHow to output events grouped by years and months using three nested query loops in Bricks.Read more →Categories: Bricks, ProTags: Nested Queries
Pro The Events Calendar Bricks Query LoopHow to output the events created with The Events Calendar plugin using a Bricks query loop.Read more →Categories: Bricks, Plugins, ProTags: Query Loop, The Events Calendar
Pro Query Loop Index in BricksThis Pro tutorial provides the code for getting the index of each post in Bricks' query loops. This can be used for either outputting the…Read more →Categories: Bricks, ProTags: Loop Index
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
Designing individual posts with BricksDid you know that Bricks also enables us to design individual posts (of any post type) with the Bricks editor?Read more →Categories: Bricks, FreeTags: bricks/active_templates, Filters
How to apply a custom query var to multiple query loops in BricksIn this tutorial, we'll learn how to apply a PHP filter to modify the query var of multiple query loops in a single function Introduction…Read more →Categories: Bricks, FreeTags: Dynamic Data, Query Loop
Pro Parent Query Loop Object – Traversing Nested Query Loops Up in BricksBricks enables us to build nested query levels of unlimited levels. Here are a couple of examples: Sometimes, you might want to obtain the parent…Read more →Categories: Bricks, ProTags: Nested Queries
Pro Adjacent Posts Bricks Query LoopThis Pro tutorial provides the steps to customize a posts query loop in Bricks to show previous and next posts on single post pages. The…Read more →Categories: Bricks, ProTags: Adjacent posts
Pro Meta Box Relationship Slider in BricksThis Pro tutorial provides the steps to modify the query parameter of a Bricks query loop to display slides of posts that are related to…Read more →Categories: Bricks, Plugins, ProTags: bricks/posts/query_vars, Meta Box, Query Loop, Relationship