Return to: SmartSimian Documentation
Overview: What is a Query?
Whereas Creator allows you to build custom content, Queries allows you to retrieve and display that content, anywhere on your site. With Queries, you can build lists, directories, featured areas, galleries, or any other type of output you need. Queries also allows you to create search forms for any query you create.
- Display specific featured articles on your homepage.
- Display a list of products in your sidebar connected to a particular brand.
- Display upcoming events ordered by date.
- Create a virtual gallery of your artwork.
- Create a complex menu.
- Create a Resource Directory section of your site that lists thousands of resources, split into multiple pages, with a search form to filter results by keyword, type, or date.
“Queries” gets its name from what it does. As a verb, to query means to search your site’s database to return the content you want to display. As a noun, a query is that set of content that is then displayed on your site.
When creating a query, you’ll find yourself following four basic steps:
- Tell SmartSimian what to find. Which content type is this query focusing on? Should we only return content with specific field values, dates, or statuses?
- Choose how to display it. What amount of content should display? Should the results by split into multiple pages? If Templates is installed, which template should be used to display each result?
- Add a search form, or not. Optionally add search forms that can contain text fields, dropdown filters, and more.
- Display it on your site. You can display queries in a widget, or put them on any page using a shortcode.