15th Dec '23/2 comments/FavoriteRandom Row from ACF Repeater in BricksSridhar Katakam In the past, we shared how the first row of a ACF Repeater can be output in a Bricks query loop here. This Pro tutorial shows how the query results can be filtered to return a random row. Step 1 Enable query loop on an element and select your ACF Repeater as its query type. Step 2 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 Username Password Remember Me Forgot Password Tagged: Bricksbricks/query/resultFiltersProSridhar KatakamSridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.Get access to all 537 Bricks code tutorials with BricksLabs Pro
Pro Post ID Query Variable Based Post Output in BricksHow to query a single post of a custom post type using the post ID passed to a page via a URL parameter.Read more →Categories: Bricks, ProTags: bricks/posts/query_vars, Filters
Pro Looping Through a Cloneable Meta Box Sub Field in BricksThis Pro tutorial shows how a custom query type can be set up in Bricks to render YouTube videos (via the built-in Video element) whose…Read more →Categories: Bricks, Plugins, ProTags: bricks/query/run, bricks/setup/control_options, Custom Query Type, Filters, Meta Box, Query Loop
Filtering Breadcrumbs in BricksUsing the bricks/breadcrumbs/items filter to modify Bricks' breadcrumbs’ element programmatically.Read more →Categories: Bricks, FreeTags: Breadcrumbs
Querying for Posts Starting with a Specific Letter in BricksLooking to show all posts that begin with a letter, like say A in Bricks? Set Posts per page to a number that is larger…Read more →Categories: Bricks, Free, WordPressTags: bricks/posts/query_vars, Filters
Pro Feature Post on Posts page in BricksThis Pro tutorial explores different options for showing the top-most or latest post as a wide feature post with the rest in a grid on…Read more →Categories: Bricks, ProTags: bricks/posts/query_vars, Filters, Posts Grid, pre_get_posts
Pro Filtering Posts of a Bricks Query Loop by Meta Box Group’s Subfield ValueHow a Bricks filter can be used to limit the posts output by a Posts query loop based on a Meta Box group’s subfield value.Read more →Categories: Bricks, Plugins, ProTags: bricks/query/result, Filters, Query Loop
Pro Sorting ACF Repeater Rows in Bricks by Date Sub FieldHow the rows of a ACF Repeater query loop can be sorted by ascending or descending order of a date sub field.Read more →Categories: Bricks, Plugins, ProTags: ACF, bricks/query/result, Filters
Class-based Data Attributes in BricksWe go through how to add a data attribute conditionally depending on the element’s class.Read more →Categories: Bricks, FreeTags: bricks/element/set_root_attributes, Filters
Pro MemberPress in BricksThis tutorial aims to be a useful resource for using MemberPress in Bricks sites.Read more →Categories: Bricks, Plugins, ProTags: Conditions, Filters, MemberPress