Last active
December 2, 2023 18:54
-
-
Save softiconic/5a43e3db1d47569de03b563164b0f0e6 to your computer and use it in GitHub Desktop.
Configure the ACF date picker to display only the day and month.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(get_field('date')) | |
{ | |
$datetime = DateTime::createFromFormat('d/m/Y', get_field('date')); | |
$fecha_dia = $datetime->format('d'); | |
$fecha_mes = $datetime->format('M'); | |
} | |
?> | |
<span><?php echo $fecha_dia; ?></span> | |
<span><?php echo $fecha_mes; ?></span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment