Good morning, John
Thank you very much for your answer, however it seems that my problem is more complicated than it seems…
Because I have to change the first “date” of a line of my repeater only, it is not a single date field.
I tried to modify my code as well to test:
<?php # Affichage du Mois / Année de la période (1er Element / Date de départ) if( have_rows('dates') ): # Recuperation du champs "Dates" $firstDates = get_field('dates'); # On stop sur le premier item de la période $first_depart = $firstDates['date_depart']; // format date $date1 = date('l d F Y', strtotime($first_depart)); // OR $date2 = date('F Y', strtotime($first_depart)); echo($date1); echo($date2); endif; ?>
Here are some screenshots of my configuration of my dates fields:
I get the date of January 1, 1970
I think there is a problem beyond me.
And the result of the displayed code:
Thank you again for your help !
Edit – Capture (IMG) are not showing…
My Repeateur Field
Display on Website
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.