Condition based on ACF date field
-
Is it possible to set a condition based on an ACF date field? I have an ACF date field called “event_date”, and I have a Beaver module with registration details. I would like that module to only appear if the event_date is greater than or equal to today. Meaning the registration details would disappear when the event date passes.
I set up a shortcode to return the current date:
$currentDate = date( ‘Ymd’);But if I set the condition to show of the date if >= [currentDate], it doesn’t work.
Does anyone know if there’s a way to accomplish this?
Thanks
- The topic ‘Condition based on ACF date field’ is closed to new replies.