The query tab has numerous settings that you can use to display posts. It strives to support all the WordPress WP_Query arguments. It does not currently support nested where and meta queries.
Posts
When you use the “QE – Posts” widget you can select which post type to display. When using the “QE – Archive” widget the post type is automatically detected based on the archive page used.
When you enable debug you can see the WP_Query arguments currently in use. This makes it easier to debug issues with the query.
Debugging
You can enable the Debug option to get a print out of the query that will be used to show the posts on the page. Below you can see an example of such a debug printout.
Access restrictions
Under access restrictions section you can limit who has access to the AJAX requests. This is useful if you have a membership site.
Authors
This section configures the post authors that should be included in the query. If you check “Use current post author”, as per the setting, the current post author will be used to list posts.
The “Authors” and “Author not in” settings are AJAX based so by typing in the field authors are listed and can be selected. “Author names” are manually entered.
Categories
This panel is only shown if the post type supports the category taxonomy.
“Category”, “Only show categories” and “Post not in category” are AJAX based, just start typing and select the category you want in the list. “Category names” are manually entered.
Tags
This panel is only shown if the post type supports the post tag taxonomy.
“Tag”, “Only show tags” and “Post does not have tags(s)” are AJAX based, just start typing and select the category you want in the list. “Tag names” are manually entered.
Taxonomies
Add a taxonomy if you want to limit the posts shown depending on taxonomies. You can both include and exclude or base it on a dyncamic value such as a query parameter. You learn more about the Taxonomy section on it’s dedicated page.
Where query
Add a where criteria if you need one or add multiple criterias. Currently does not support OR statements. You learn more about the Where section on it’s dedicated page.
You can select between the following fields
- Title or Name
- Date or Date GMT
- Content or Excerpt
- Comment count
Meta Query/Custom Fields
You can select between none or meta query. Meta query is same as working with custom fields. You learn more about the Meta Query section on it’s dedicated page.
You can configure somewhat complex queries using the meta query panel. It does not however support nested queries at this time.
For examples on how to connect filter widgets with Meta Query see the dynamic tags Query Parameter page.
Date Query
The date query supports numerous settings such as past day, past quarter, past year, current month and current year. You can also use a dynamic setting.
Dynamic date query
The dynamic date query setting uses a GET url param to decide the date interval. You can limit the available date intervals by adding new items. If no GET param is detected data range default value is used.
Order
Currently you can only order by one value, later releases will support ordering with multiple keys or columns. This setting also supports GET URL param.
Post & Page
The Post & Page panel has numerous settings so it’s easier to just read about it on the WordPress WP_Query page.
Pagination
The pagination panel makes it possible to configure which page of posts that should be shown. It automatically integrates with the default WordPress paging. If you want to enable dynamic “Posts per page” enable dynamic tag and choose appropriate tag such as query var.