WordPress – Erstellungsdatum und Änderungsdatum

Die folgende Abfrage ist ganz praktisch, wenn man das Erstellungs- und Änderungsdatum eines Posts ausgeben möchte.

<?php if (get_the_time('j. F Y') != get_the_modified_time('j. F Y')): ?>
Letzte Aktualisierung: <?php the_modified_time('d/m/Y') ?>
<?php else: ?>
<?php the_time('d/m/Y') ?>
<?php endif; ?>

Erstellungsdatum

Ausgabe – creation date

<?php the_time() ?>

Änderungsdatum

Ausgabe – modified date

<?php the_modified_time() ?>

Schreibe einen Kommentar

* Pflichtfelder