Date Filter
Displays a dropdown of date ranges that visitors can use to filter content by date. By default it lists preset ranges such as Today, Last 7 Days and This Year. You can also add one option per year.
Shortcode:
[date_filter]
Attributes:
Preset date ranges:
For calendar content, an entry matches when its start time falls in the selected range, or when the event is still running at the end of the range. For other content, the entry's last modified date is used, or its date added if it has never been modified.
Code Example:
[date_filter id="news-date" class="form-select" label="Published" default_filters="0" years="2023-2025"]
Output:
<label for="news-date">Published</label>
<select class="form-select" id="news-date">
<option selected value="">All Dates</option>
<option value="01/01/2023-12/31/2023">2023</option>
<option value="01/01/2024-12/31/2024">2024</option>
<option value="01/01/2025-12/31/2025">2025</option>
</select>