Black Friday Sale! Get Flat 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, respectively, 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, open a page, or if you prefer, edit an existing one. Once you're in there, hit the 'Edit with Bricks' button.

2. Once you're in the Bricks editor, add the “Container element" to the page & 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.

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

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

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.'

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. Open or edit your page: Start by opening a new page or editing an existing one. 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.

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

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

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.

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

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

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.