30th Mar '23
/
5 comments

Accordion Grid Query Loop in Bricks

Accordion Grid Query Loop in Bricks

Updated on 5 Nov 2025

This Pro tutorial provides the steps to set up a query loop on a nestable accordion element in Bricks such that the "titles" are arranged in a grid with the corresponding content (panels) opening below the clicked title either taking up the container width or going edge to edge.

We shall also add a working close icon for the panels.

Use Case: Show team member cards with member info neatly expanding when the headshot + name is clicked.

Since a standard nestable accordion element is being used with a query loop, we have full control w.r.t what info appears before and after the accordion items expand. In the screenshot below, several custom field values that are set up with ACF are being shown.

Sample demo of content in the container width:

Step 1

Edit your Page/template with Bricks.

Step 2

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
ACF User Field Bricks PHP Query

ACF User Field Bricks PHP Query

In the Bricks Facebook group a user asks: my end goal was to create a set of cards that would display the Users that are…
Categories:
Pro
Limit the Number of Posts in a Bricks Query Loop of Relationship Type

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

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…
Related Posts by Author in Bricks

Related Posts by Author in Bricks

Querying posts on single posts by the author of the current post.
Categories:
Pro
Bricks Query Loop for Top-level Parent Pages with Children

Bricks Query Loop for Top-level Parent Pages with Children

In the Bricks Facebook group, a user asked: Looking for a custom query to output a list of posts in the same hierarchy that the…
Categories:
Pro
Post-specific ACF Repeater Galleries as Sliders in Bricks

Post-specific ACF Repeater Galleries as Sliders in Bricks

How to output ACF Repeater field rows with the images of the Gallery-type sub field as a slider.
Pro
Image Banner as Query Loop Posts Grid’s Last Item in Bricks

Image Banner as Query Loop Posts Grid’s Last Item in Bricks

In the comments section of How to Insert Element(s) Between Query Loop Posts in Bricks tutorial, a site member asked: This is fantastic! Is there…
Categories:
Tags: