Created
July 2, 2013 15:32
-
-
Save diije/5910310 to your computer and use it in GitHub Desktop.
WordPress : afficher la date de dernière modification d'un article, seulement si celle-ci est antérieure à la publication.
This file contains 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
<span> | |
Publié le <?php the_date(); //date de publication ?> | |
<?php if(get_the_modified_time('Gi') - get_the_time('Gi') > 0) | |
// si la date de modification est supérieure à la date de publication (ou la soustraction supérieure à 0) | |
// alors on affiche la date de modification | |
{ ?> | |
et modifié le <?php the_modified_date(); | |
} ?> | |
</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment