I’m using the Advanced Custom Fields plugin in WordPress to gather info on some custom posts types that I’m using to create a list of events. Examples of the ACF fields:
“Date of Event,”
“End Date,” and
“Hide Date” (as in, the date to hide the event).
I have a bunch of conditional logic to set up the $exp_date variable, but I can’t get it to work.
When I use
if (time() >= strtotime("$exp_date")) { display events }
it works fine to display events that have passed, but when I switch it to
if (time() <= strtotime("$exp_date")) { display events }
it doesn’t work to display upcoming events. Is there something fundamental that I am missing?
Here is the pastebin for the entire page: http://pastebin.com/Hu4Z7wU2