Tell us what you are trying to do?
Hi, in my template i have tried a filter that works but it is placed i Query Filter section. I would like to place it the Templates for This View section. How to write that.
[wpv-conditional if=" ??????"]<p> do something </p> [/wpv-conditional]
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional
Is there a similar example that we can see?
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-id
What is the link to your site?hidden link
Hi there,
Thank you for contacting us.
We apologize for the delay, as we had an unusually busy queue after the weekend.
From your screenshot ( Skærmbillede 2019-03-17 kl. 07.57.45.png ), I understand that you'd like to target the condition where the date type custom field value falls within today and tomorrow.
If that is correct, you can use the Views plugins date filter in the condition like this:
( ref: https://toolset.com/documentation/user-guides/date-filters/ )
[wpv-conditional if="( $(wpcf-field-slug) gte 'TODAY()' ) AND ( $(wpcf-field-slug) lte 'FUTURE_DAY(1)' )"]
Yes
[/wpv-conditional]
As a result, "Yes" will only be printed when the current post's custom field with slug "field-slug" falls within today and tomorrow.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi Waqar
Thanks for your help. Actually i only want values that falls within that particular day
[wpv-conditional if="( $(wpcf-End-hour) lt 'now()' ) AND ( $(wpcf-START-hour) lt 'now()' )"]
So do you think my code works or yours? Thanks for link to syntax.
Regards
Henrik Paragate
My issue is resolved now. Thank you!