Created
October 22, 2022 04:40
-
-
Save ErnestoRB/be195876d8a62cf8114fbc716c3e1a4a to your computer and use it in GitHub Desktop.
Get last modified post datetime PHP Wordpress
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 | |
$last_date = get_lastpostmodified('blog'); // obtiene la fecha de la ultima modificacion a un post | |
$last_time = strtotime($last_date); // convierte a numeros para poderla formatear | |
echo "La última fecha de modificación fue el ". date("j / M / Y \a \l\a\s H:i:s", $last_time); // formatea | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment