“get_field” id not working and stop the execute of all next code, when I change it to “the_field” it works good.
Here is the line of code:
$eventDate = new DateTime(get_field(‘event_date’));
Thank you
What is the date format you are returning? Is it a date format that is compatible with DateTime()? https://www.php.net/manual/en/datetime.formats.php