Last active
August 15, 2021 00:25
-
-
Save jauhari/6620e834563f3813b22236ddf7b8a67e to your computer and use it in GitHub Desktop.
Menampilkan Tanggal Terakhir Update di WordPress Theme
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
<?php | |
// mengambil waktu lokal dari postingan dalam detik | |
$local_timestamp = get_the_time('U'); | |
// mengambil data waktu update terakhir tulisan | |
$lastModifiedTime = get_the_modified_time('U'); | |
if ($lastModifiedTime >= $local_timestamp + 86400) { | |
echo "<p>Update "; | |
the_modified_time('F jS, Y'); | |
echo " pada "; | |
the_modified_time(); | |
echo "</p> "; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kode Asli dari PHPPot dan telah kami publikasikan ulang di WordPress Tips di NGONOO.com