I'm trying to show an ACF field before 48hours of a specified ACF DateTimePicker and want to hide it after 24 hours, the fields are always showing, and not getting hidden after 24 hours, could you please assist me what am I doing wrong, below is my code
<?php //show match predictions only of it has a value and in between the specified date and time
$showPredictionTime = date("d/m/Y, g:i a", strtotime('+54 hours', time()));
$hidepredictionTime = date("d/m/Y, g:i a", strtotime('+78 hours', time()));
$matchStartTime = get_sub_field('match_time');
if (get_sub_field('match_predictions_url') && $showPredictionTime >= $matchStartTime && $matchStartTime <= $hidepredictionTime ) { ?>
<div class="elementor-button-wrapper">
<a href="<?php the_sub_field('match_predictions_url'); ?>" class="elementor-button-link elementor-button elementor-size-xs" role="button">
<span class="elementor-button-content-wrapper">
<span class="elementor-button-text">Predictions</span>
</span>
</a>
</div>
<?php }
?>
question from:
https://stackoverflow.com/questions/65829787/show-a-div-before-48hours-of-acf-datetimepicker-field-and-hide-after-24hours-of 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…