Skip Navigation

[Résolu] Hide Datelist value in relation of actual date

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
How to filter the posts by custom date field having past date

Solution:
You should create a block view or classic view and to the Query filter section, you should try to add the custom filter for your date custom field and select the comparison as Number and grater than PAST_DAY and input the value 2.

You can find the proposed solution, in this case with the following reply:
=> https://toolset.com/forums/topic/hide-datelist-value-in-relation-of-actual-date/#post-1611737

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/views/filtering-views-by-custom-fields/
=> https://toolset.com/documentation/user-guides/views/date-filters/

This support ticket is created Il y a 3 années et 11 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Marqué : ,

This topic contains 2 réponses, has 2 voix.

Last updated by thomasB-2 Il y a 3 années et 11 mois.

Assisted by: Minesh.

Auteur
Publications
#1610267

We try to manage a company with it trainings with formidable. We have created a CPT "trainings".
These trainings are managed once in a month, so we have a list of date like
01.05.2020
03.06.2020
02.07.2020
06.08.2020

Question for us was as it possible to limit the shown value for these dates to only actual values. Means dates wich are in past could be automatically hided related with a rule "2 Days before Actual date".

So in the list on top actual will show 3 Dates starting from 03.06.2020, because the first date (01.05.2020) was not in that condition (Todaydate ( 04.05.2020) - 2Days = 02.05.2020).
Means Values:
01.05.2020 (in Past)
03.06.2020
02.07.2020
06.08.2020

Was that possible?

#1611737

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand, you have a custom date field added using Types plugin and you want to filter your posts by that date custom field.If this is correct - yes, you can filter your posts by a custom date field.

You should create a block view or classic view and to the Query filter section, you should try to add the custom filter for your date custom field and select the comparison as Number and grater than PAST_DAY and input the value 2.

Datefield is a number greater than PAST_DAY(2)

Screenshot: hidden link

More info:
=> https://toolset.com/documentation/user-guides/views/filtering-views-by-custom-fields/
=> https://toolset.com/documentation/user-guides/views/date-filters/

#1618763

My issue is resolved now. Thank you!

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