Frontend Search Settings -> Date filters
These options will allow filtering posts, pages (or any CPT) by publication date.
There are two date filter options to use:
- Display 'Posts from date' filter -> Any objects before this date will be excluded
- Display 'Posts to date' filter -> Any objects after this date will be excludedEither of the options can be Disabled or set to a Date or to a Relative Date.
When using the Date, the exact date must be specified to the selector. With the Relative Date, you can use a more dynamic value - such as the current date by default, as it defines a date before the current date. Positive values are subtracted from the current date, negative values are added to the current date.
For example, let us assume today is 10th of january 2016. Changing the relative date to:
- 1 year, 0 months, 0 days -> will result: 10th of january 2015
- -1 year, 0 months, 0 days -> will result: 10th of january 2017
- 0 year, 1 months, 1 days -> will result: 9th of december 2015
- 0 year, -1 months, -1 days -> will result: 11th of february 2016