Hi fermincg,
I’ve put together this gist on GitHub. It doesn’t answer your question specifically but should point you in the right direction:
https://gist.github.com/robhob/9b8e0e3c114a31a80082af3f0fc49b5f
Add the function to your child theme’s functions.php file and then add the function name to the Content Visibility field.
Hi @fermincg!
Yes! For example, if the date is December 25th, 2018, the following would work:
date('Ymd') === '20181225'
@robhob,
Interesting function! We are working on a simplified interface for common expressions, and may include yours (credited of course) with your permission! 🙂
@jhorowitz, you’re absolutely welcome to use it. The catch is that if the web server is in a different time zone it’s not going to be very accurate. Not sure how to go about getting the time from the visitor’s machine rather than the server.
Thank you very much for the answers.
date(‘Ymd’) === ‘20181225’ It’s work.
Robhob, also works!