1. Home
  2. Query Elements
  3. How to's
  4. Archive/Posts widget – Where section

Archive/Posts widget – Where section

The Where section in the Archive and Posts widget makes it possible to configure SQL based where criteria.

You add new criteria using the add item button. All criteria is compared with AND statement, this means that all criteria must be true in order for the posts to be listed.

Field

Select which field on the Post class you want to target in your criteria.

Compare

Select how you want to compare the selected field. When using between you get to enter two values.

Value

You can either enter values manually or select one of the available dynamic tags. Which tags are available depends on which plugins you have activated. To see which tags are included with

Examples

List all posts where post title contains the string food.

In example the Post title is compared to a manually entered value using a like statement .

Below you can see the debug statement for the criteria.

Updated on August 3, 2020

Was this article helpful?

Related Articles