Created and modified time of page?
-
I need to display when of post is created and edited.
On post page I tried with this:
Time created<?php the_time('Y-m-d'); ?>
Edited (updated)<?php the_modified_time('Y-m-d'); ?>
It works fine on posts, but on page template it displays just created time, modified (update) time is blank.
Question 1:
How to show modified time on pages too?Question 2:
Also I need to display both times on category, tag and author pages. Using codes above I get those times, but from last post on current page, and I would like to get times from first post on current browsing page.
I have default post order (latest first), so I need latest post’s times, which is first post on current page, and like I said I get times of last post on current page.How to get created / modified time of first post on current page?
- The topic ‘Created and modified time of page?’ is closed to new replies.