Birthday sale is live. Get upto 20% OFF 🎉

Grab the Deal


Max Query Loop for Bricks Builder

Introducing Max Query Loop for Bricks Builder! This cool new feature is an upgrade to the existing Bricks' query loop. It's designed to give you even more control by offering new types of queries that are super handy for displaying Custom Posts Types on your WordPress websites.

With this update, we are adding 2 new query types: Adjacent Posts and Related Posts.

Let’s now see how it works:

Display Adjacent Posts using Max Addons Query Loop#

This Max Loop Query lets you fetch the previous and next posts in chronological order based on the current post in the loop. This feature works within the context of the query loop and users can use single post templates to display links to the previous and next posts.

1. First, edit the existing Single Post Template, or if you prefer, you can also create a new page and later save it as a template. Once you're in there, hit the 'Edit with Bricks' button.

2. Add the “Container element" & toggle on the 'Use query loop' button

3. As soon as you enable the Use query loop button, you’ll be displayed with a drop-down menu. Choose 'Max Query' from the listed query options.

enable max query

4. Max Query: Choose 'Adjacent Posts' to showcase the posts before and after the current one in the loop.

adjacent posts

5. Post Type: Choose Previous or Next post type as per your preference.

choose previous or next posts

6. In same term: Toggle on 'In same term' to include only posts with the same category as the one you’ll set in the Taxonomy section below.

7. Taxonomy: If you turn on the "In the same term" option, you can pick the specific category from this section.


8. Excluded Terms: To exclude specific posts, add their names under 'Excluded Terms.'

exclude terms

This Max Loop Query allows you to display posts that share specific criteria with the current post, such as categories, tags, or custom taxonomies.

1. Edit your template/page: Start by opening a new page or editing an existing single post template. Click on 'Edit with Bricks'.

2. Once you're in the Bricks editor, add the “Container element" to the page.

3. Enable Query Loop: Turn on 'Use query loop' and choose 'Max Query' from the provided query options.

enable max query

4. Set Max Query: Choose 'Related Posts' to display posts with similar categories as the current post.

choose related post

5. Select Post Type: Specify the type of post type you want to fetch.

choose post type

6. Max Related Posts: Decide the maximum number of posts you want to display.

7. Set Order: Choose between ascending or descending order for the posts.

order posts

8. Order By: Define how the posts should be ordered, such as by ID, Author, Title, or Published Date.

order by

9. Common Taxonomies: Pick which taxonomies to consider when finding posts with similar terms.

common taxonomies

This is how you can use the Max Query Loop extension. Hope this helps :)

Not the solution you are looking for?

Please check other articles or open a support ticket.