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 Conditionally Excluding Elements from Bricks EditorIn the past, we shared How to Exclude Elements from Bricks Editor. This Pro tutorial shows how specific elements can be excluded selectively based on…Read more →Categories: Bricks, ProTags: bricks/builder/elements, Filters
Pro How to Order Posts by Post Meta in BricksUpdated on 4 Feb 2024 This Pro tutorial provides the steps to show posts marked as featured at the top and then the other posts…Read more →Categories: Bricks, ProTags: bricks/posts/query_vars, Filters, meta_query
Pro Related Posts by Taxonomy in BricksIn the previous Posts Related by Current Post's Terms in Bricks tutorial, we showed how posts related to the current single post that have the…Read more →Categories: Bricks, ProTags: Query Loop, Related Posts
Whitelisting echo functions in Bricks 1.9.7 and aboveUnderstanding the bricks/code/echo_function_names filter to ensure that your echo functions continue to work.Read more →Categories: Bricks, FreeTags: bricks/code/echo_function_names, Filters
Pro Products in the Same Product Categories as the Current Product in BricksHow to output WooCommerce products related by the current product’s categories when viewing the product page.Read more →Categories: Bricks, ProTags: bricks/element/settings, Filters, WooCommerce
Pro Sibling Terms Bricks Query LoopHow to limit the terms of a Terms query loop to only the children of the current term’s parent.Read more →Categories: Bricks, ProTags: bricks/terms/query_vars, Filters
Pro Making a Nav Menu Item Active for Custom Post Type Single Views in WordPressConsider this scenario: CPT: project Page titled "Project" is being used to show a list/grid of all the projects rather than the CPT archive. When…Read more →Categories: Pro, WordPressTags: nav_menu_css_class
Pro ACF User Field Bricks PHP QueryIn the Bricks Facebook group a user asks: my end goal was to create a set of cards that would display the Users that are…Read more →Categories: Bricks, Plugins, ProTags: ACF, Users Query
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