I am not sure if what I want to do is possible or if I just have wrong syntax.
I use the following test to check an end date being different to a start date and it works fine.
[wpv-if f1="wpcf-event-end-date" f2="wpcf-event-start-date" evaluate="$f1 > $f2" debug="true"] - [types field="event-end-date" style="text" format="F j l"][/types][/wpv-if]
I want to use a similar test but the date fields are in a parent post called event. I tried a few syntax combinations but cannot get anything to work. Here is my latest attempt:
[wpv-if f1="wpcf-event-end-date id='$event'" f2="wpcf-event-start-date id='$event'" evaluate="$f1 > $f2" debug="true"] - [types field="event-end-date" id="$event" style="text" format="F j l"][/types][/wpv-if]
Please can you assist?
Thanks
Tony
Luo Yang
Supporter
Languages:
Anglais (English )
Chinois simplifié (简体中文 )
Timezone:
Asia/Hong_Kong (GMT+08:00)
Please try this:
[wpv-if evaluate="'[wpv-post-field name="wpcf-event-end-date" id="$event"]' > '[wpv-post-field name="wpcf-event-start-date" id="$event"]'" debug="true"]
- [types field="event-end-date" style="text" format="F j l"][/types]
[/wpv-if]
More help:
https://toolset.com/documentation/views-shortcodes/#wpv-post-field
Thanks Luoy - sorry about delayed response - I was diverted to another project!
Tony