Home Forums Front-end Issues How to change the frontend output (datefied)


How to change the frontend output (datefied)

    • rabo

    • September 1, 2020 at 8:37 am

    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.

  • 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.

    • xaibi

    • September 8, 2020 at 7:26 pm

    You can change this in to the field and for the date formatting you need to see this

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.