Using Meta Queries in Breakdance’s Post Loop Builder
This documentation guides you through the process of utilizing meta queries with the Post Loop Builder and Post List elements in Breakdance to filter and display content based on specific criteria, such as ratings or earnings.
Creating a Meta Query
Setting Up the Query
- Within the Post Loop Builder, navigate to “Query.”
- Select “Custom” and click “Edit Query” to access the Query Builder.
- Make sure the correct post type is selected, e.g., “movies.”
Filtering by Ratings
- Under “Meta Query”, click “Add New query.”
- In the “Meta Key” field, type the custom field’s name you wish to filter by, like “rating.”
- In the “Meta Value” field, set the value you’d like to look for, e.g., “5” for movies with ratings of five or higher.
- Adjust the “Compare By” operator and “Type” to appropriate values for the query you’re performing. In our example, we would choose “>=” and “NUMERIC.”
- Click “Apply Query” to view the filtered selection of posts.
Advanced Meta Query Configurations
Utilizing Multiple Queries
- With the meta query option, you can add several queries to further refine your results.
- Change the relation between queries using “AND” or “OR” depending on your requirements.
- Employ nested queries for more advanced filtering options.
Additional Notes
The Meta Query functionality in Breakdance offers a powerful tool for filtering content in your Post Loop Builder and Post List elements without the need for coding. By understanding the basics of setting up these queries and utilizing advanced features like multiple or nested queries, you can create highly customized content displays based on your specific criteria. This feature is particularly useful for managing large collections of custom post types with various attributes.