Skip Navigation

[Resolved] Conditional statement to return result if between certain times of day

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.

Our next available supporter will start replying to tickets in about 0.55 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Christopher Amirian 2 years ago.

Assisted by: Christopher Amirian.

Author
Posts
#2492169

Hi there!

I have a Custom Post Content Template. I want to ONLY show certain information between school hours i.e. 8:00am and 4:00pm.

How can I create a [wpv-conditional if=""] statment to do this? Will it require a custom function or can I use the "time" built in funcion?

Many thanks

#2492563

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

It is possible with custom coding and the conditional shortcode (not the block).

I suggest that you check the answer below to know how to do that:

https://toolset.com/forums/topic/is-there-a-way-to-show-html-based-on-condition-of-the-current-eastern-time/#post-326025

Please consider that this is a custom code request and we are unable to give the exact code for your user-case, and the answer above is an attempt to give you guidance on how to do it yourself.

Thank you.