- For a complete picture of how to use Loop Grids, check out our series of Loop Grid articles:
- What is the loop grid? (with video)
- How do I build a loop grid?
- How do I customize the layout of a loop?
- How do I paginate my loop?
- How do I customize which items appear in my loop?
- Building a query with the loop builder
In a Loop Grid, queries are used to select exactly what content you want to display in your loop. This, in addition to all the design options, makes the loop grid an extraordinarily flexible tool.
In this example, we’ll walk through the process of designing a simple query to show you how the query system works.
Building the Query
For this example, we’ll be editing a loop built on a blog using our website kit – The Adventurers. We’ve added categories and tags to the posts, and then created a loop and saved it, so we’re back to editing the page.
Now we want to create a query so that our loop will only display posts having to do with traveling on a budget.
- Select the Loop Grid. In general, it’s easiest to access the loop grid using the Navigator.
- Select the Query menu
- Since we want to create a loop with posts, we’ll leave Source set to its default setting of Posts.
- We’re looking to include posts so we’ll leave the toggle on Include.
- Click the Include by text box and you’ll be presented with two choices – Term and Author. Selecting Author will open up a text box where you can type in the name of the author you would like to select. Selecting Term will open up a text box, allowing you to select categories, tags or, if you have custom post types, other properties.
- Select Term since we’re looking to include posts by category and tag (you can also select both).
- Now we need to select our terms. Since we’re looking for posts about budget travel, we’ll filter for posts that were marked with the category Travel and tagged as Budget when they were created.
- Start typing the word Travel in the Term text box. Notice that as you type a dropdown will present you with a list of terms matching your parameters.
- Start typing the word Budget in the Term text box. Notice that as you type a dropdown will present you with a list of terms matching your parameters.
- Our loop only shows the posts fitting our conditions.
Now that you know how to build a Query, you may want to review how to customize the items that appear in your loop. Here you can learn more about how to order the items you’re including in your loop.
To get the most out of Elementor, check out the Elementor Academy for helpful learning resources. If you come across any issues or need help, please contact our Support Center.