Skip Navigation

[Resolved] Conditional greater than/lesser than with dates from related posts

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
- 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)

This topic contains 3 replies, has 2 voices.

Last updated by sarahK-2 1 year, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2611405

Given a custom post type "Performance" that has the following relationships:

Event - Performance (One - Many)
Performer - Performance (One - Many)

"Event" has a date field "Event Date".
"Performer" has a date field "Performer Certified Through"

On a View for a Performance (which has a known connected Event and a known connected Performer) I am trying to use a conditional display. I want to be able to say:

"This performer needs to recertify before this event (certification expired/expiring)", or
"This performer is certified for this event"

If the performer-certified-through date is ON or AFTER the event-date the performer would be certified.
If the performer-certified-through date is BEFORE the event-date the performer would need to renew.

How would I write the conditional statement (considering the following)?

[types field='event-date' item='@event-performance.parent'][/types]
[types field='performer-certified-through' item='@performer-performance.parent'][/types]

#2611439

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Here is the doc that should help you to know about how you can access the field of grand parent:
- https://toolset.com/documentation/legacy-features/views-plugin/displaying-fields-of-grandparents/

You should try to configure your conditional block once you get the value of grand parent and then try to display it accordingly. If that does not help and you do not know how to do it, please get in touch with me with admin access details and problem URL where you want to display the conditional content.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2611441

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Here is the doc that should help you to know about how you can access the field of grand parent:
- https://toolset.com/documentation/legacy-features/views-plugin/displaying-fields-of-grandparents/

You should try to configure your conditional block once you get the value of grand parent and then try to display it accordingly. If that does not help and you do not know how to do it, please get in touch with me with admin access details and problem URL where you want to display the conditional content.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2612355

My issue is resolved now. Thank you!