Skip to content

Instantly share code, notes, and snippets.

@jauhari
Last active Aug 15, 2021
Embed
What would you like to do?
Menampilkan Tanggal Terakhir Update di WordPress Theme
<?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> ";
}
?>
@jauhari

This comment has been minimized.

Copy link
Owner Author

@jauhari jauhari commented Aug 15, 2021

Kode Asli dari PHPPot dan telah kami publikasikan ulang di WordPress Tips di NGONOO.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment