How to retrieve the last modified date for a template.
-
I don’t intend to retrieve the date from WordPress published admin date, but rather for every time I edit directly the content in the template. I know how to do it in JS with
javascript:alert(document.lastModified)
but I would rather PHP use instead, and if posible in the format year-month-dayHave tried so far:
<?php echo date("Y F d", getlastmod()); ?> <?php echo get_post_field( 'post_modified', 288 ); ?> <?php get_the_modified_date();?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to retrieve the last modified date for a template.’ is closed to new replies.