php - Show only if currentTime > scheduleEnd using gravity forms -
i want show shortcode if current time before closetime.
i using conditional in page.php 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 because not adding form anywhere in main function not sure how can work.
thank you!
Comments
Post a Comment