Skip Navigation

[Resolved] Filter posts by custom date field (not published date)

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 5 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#924089

Tell us what you are trying to do?
I have 7 columns from Monday to Friday
I want 7 views lists (monday-friday) to list up-coming events
What is the link to your site?
hidden link
Many thanks.

#924485

Hello,

I assume we are talking about a calendar system, there isn't such an exact feature within Toolset plugins.
For example, you can create a custom date filed, use it to store the "events" date and time, and you can create a post view to query the posts, and order by the custom date filed, but it can not display the posts in "7 columns from Monday to Friday".

You might consider other calendar plugin, for example:
https://wordpress.org/plugins/search/calendar/

#924538

Thanks but I don't think you understood my question. I don't need a calendar plugin.
What I want achieve is:
I create a Toolset View for each day of the week.
For monday I am looking for the right filter parameters that will find "monday" (or whatever the database stores for monday) from my custom post "Date":
So If my custom post "date" field contains "Monday 13 July 2018" the post will be selected.
But if my custom post "date" contains is "Tuesday 14 July 2018" the post will NOT be selected.
I will then duplicate the "monday" Toolset view, call it "Tuesday" and filter for tuesday. Same for Wednesday, Thursday etc.
The only thing I am asking is what are the correct filter parameters to find a particular day of the week.
Thanks.

#924575

Thanks for the details, there is not such kind of built-in feature within Views plugin, see document:
https://toolset.com/documentation/user-guides/date-filters/

No such an option to compare with "the day of week" in custom date field filter.

But it is available in the post publish date filter:
https://toolset.com/documentation/user-guides/filtering-views-query-by-date/
you can also set the day of the week or the day of the month ...

So you can try one of below two options:
1) Add another custom select field "day of the week", with options:
Monday, Tuesday ...
And use it in the Views filters.

2) Switch to wordpress publish date filter, see above document.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.