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.
Build 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.
Use the Navigator to access the Loop Grid. - Select the Query menu
Use the Query menu to filter the displayed items. - To create a loop with posts, leave Source set to its default setting of Posts.
- To include posts, 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 to include posts by Category and Tag (you can also select both).
Use the Include by text box to decide if you’re filtering by term, author or both. - Since we’re looking for posts about budget travel, filter for posts that were marked with the category Travel and tagged as Budget when created.
- Start typing the word Travel in the Term text box. Notice that as you type, a dropdown will present 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 a list of terms matching your parameters.
Filtering for articles in the Travel category with the Budget tag. - The loop only shows posts fitting our conditions.