The Query Tab

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 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.

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.

Where query

Add a where criteria if you need one or add multiple criterias. Currently does not support OR statements.

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.

Query item

Meta value: You can enter manual values or use “dynamic tags”. If you want to change “Compare” method you need to clear the meta value field if you have entered value. This is because depending on your “Compare” different “dynamic tags” are listed. You see if you have this issue in the criteria preview.

You can configure somewhat complex queries using the meta query panel. It does not however support nested queries at this time.

Meta key: You can enter a key manually or use the “Dynamic tag” option and select detected keys from a list.
Compare: Depending on what you choose more fields are shown. You standard large and lower than fields show only one field. If you choose for example between an extra field is displayed as well.
Type: You can select from char(text), numeric, date, datetime, time, signed, unsigned, decimal and also “Current Post” or “Current user”. Current post and user returns the numeric post or user id.

In above example “test” is another setting that needs to be cleared.

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.

Updated on June 25, 2019

Related Articles