Date time picker
https://www.advancedcustomfields.com/resources/date-time-picker/
Query posts (upcoming)
// find date time in 7 days
$time_next_week = strtotime('+7 day', $time_now);
In the example above , is it possible to replace the (‘+7 day’) with an ACF number field that a user can select ?
Something like –
$daysafter = get_field('days_after');
// find date time in 7 days
$time_next_week = strtotime('+$daysafter day', $time_now);
How could i code this , the above example doesn’t work , so is there a correct way to write this?
Sorry , solved it – Like this.
$daysafter = get_field('days_after');
// find date time in 7 days
strtotime('+ '.$daysafter. 'days', $time_now);
Thank you