Adding a timestamp to your index page in WordPress…

Thanks to this and this and this site, I was able to figure out how to add a timestamp to my posts on the index.php of my site:

1.  Navigate to your ~/wp-content/themes/default/index.php, and look for this line:

<small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small>

I recommend commenting it out, by making it look like this: 

<!–<small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small>–>

(It also wouldn’t kill you to just flat out back up your index.php before you start this)

2.  Now, right below (or above) where you had that line, add this: 

<small>Posted: <?php the_time(‘F j, Y’); ?> at <?php the_time(‘g:i a’); ?> by <?php the_author() ?></small
>

3.  Done.  It should add the timestamp for each post on your index page.

This entry was posted in Geek and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *