Skip Navigation

[Resolved] Date Query Filter

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 1 year, 8 months ago.

Author
Posts
#2700550
2697462-Screenshot_2024_05_13_213815.jpg

Dear Support Team

Tell us what you are trying to do?
I want to show posts which are published on different dates. I have three views for that: In the first view I want to show only posts published today. In the second view I want to show only posts published yesterday. And in the third view I want to show posts published before yesterday.
I don`t know how to set the query filter for each view correctly.

You can see a video description here: hidden link

Is there any documentation that you are following?
I was reading this documentation: https://toolset.com/documentation/legacy-features/views-plugin/filtering-views-query-by-date/

Thanks,
Philipp

#2700962

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Philipp

I understand it can be a little confusing knowing how to specify the relative dates.

For the first View, published today, you want published date equal to

Year => CURRENT_ONE
Month => CURRENT_ONE
Day => CURRENT_ONE

For the second View, published yesterday, you want published date equal to

Year => CURRENT_ONE
Month => CURRENT_ONE
Day => PAST_ONE => 1

For the third View, published before yesterday, you want published date before

Year => CURRENT_ONE
Month => CURRENT_ONE
Day => PAST_ONE => 1
#2701083

Thank you, that helped!