Hi comunity,
I created a date field that it is called “datumsfeld”. In my theme I wrote:
<?php the_field(‘datumsfeld’); ?>
The output in the frontend is something like:
31 9 Y
But I would like to have:
31. september 2020
or maybe:
31. 09. 2020
How and where can I change the output of the frontend? I suppose there is either some interface for doing that or I can do it in my theme using php.
I would be glad if somebody could herlp me.
Thanks
Raphael
Date fields have 2 settings “Display Format” and “Return Format”. The first is used when editing a post and the second is used when using get_field(), the_field(), etc.
If these do not work for you for some reason then you would need to format the value yourself using PHP date() functions.
You can change this in to the field https://prnt.sc/udiub6 and for the date formatting you need to see this https://wordpress.org/support/article/formatting-date-and-time/