Hi @BuzzStory,
I’m sorry about the delay here! I tested this and it’s working but I suspect there could be an issue depending on what return format you use on the ACF field. The dates are passed into the PHP strtotime function which guesses if you are using American/European formats. Here’s how they handle it (copied from PHP docs)
Dates in the m/d/y
or d-m-y
formats are disambiguated by looking at the separator between the various components: if the separator is a slash ( /
), then the American m/d/y
is assumed; whereas if the separator is a dash ( -
) or a dot ( .
), then the European d-m-y
format is assumed. If, however, the year is given in a two digit format and the separator is a dash ( -
), the date string is parsed as y-m-d
.
If you need to keep the return format the same, Dynamic Content has some low level parameters that let you reformat the output. If you set type="date"
, the result will be parsed using the date format configured with WordPress.
{{dc:acf:post_field field="date" type="date"}}
And if you already have type="date"
you can also override the format used:
{{dc:acf:post_field field="date" type="date" format=""}}
These two parameters don’t really care if the data came from ACF or some other source, so even though it’s an ACF date field they can be used to reformat the value returned from ACF.