I want to show a shortcode only if the current time is before the closetime.
I am using this conditional in my page.php but is not working:
$closeTime = strtotime($form['scheduleEnd'] . " " . $form['scheduleEndHour'] . ":" . $form['scheduleEndMinute'] . " " . $form['scheduleEndAmpm']);
$currentTime = strtotime(date('m/d/Y h:i a'));
if ($currentTime > $closeTime) {
echo do_shortcode('[stickylist id="'.get_field( 'id_form' ).'" showto="creator"]');
}
I think is because i am not adding what form is anywhere in the main function but I am not really sure how can I get this to work.
Thank you!