Title: Adding Time to Posts
Last modified: August 18, 2016

---

# Adding Time to Posts

 *  Resolved [alan52](https://wordpress.org/support/users/alan52/)
 * (@alan52)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/adding-time-to-posts/)
 * I’m a code dummy, but I’m learning. How do I add the time to each of my posts?
   Right now all I get is the date.
 * What is the code and where do I put it?
 * Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/adding-time-to-posts/#post-642566)
 * Take a look at [Template_Tags/the_time](http://codex.wordpress.org/Template_Tags/the_time)
 * You’ll probably want to use that in your theme’s index.php file.
 * [Stepping into Templates](http://codex.wordpress.org/Stepping_into_Templates)
   
   [Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy) [Stepping into Template Tags](http://codex.wordpress.org/Stepping_into_Template_Tags)
   [Editing Files](http://codex.wordpress.org/Editing_Files)
 *  [deanhatescoffee](https://wordpress.org/support/users/deanhatescoffee/)
 * (@deanhatescoffee)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/adding-time-to-posts/#post-642567)
 * Check out [this page](http://codex.wordpress.org/Formatting_Date_and_Time) for
   more about how WP handles dates and times, and [this page](http://php.net/date)
   for a list of all the formatting options you have available in regards to date
   and time. Remember that you’ll probably want to change the date and time format
   for index.php (Main Index Template), single.php (Single Post), and page.php (
   Page Template), and possibly others depending on your theme.
 *  Thread Starter [alan52](https://wordpress.org/support/users/alan52/)
 * (@alan52)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/adding-time-to-posts/#post-642585)
 * Got it! Thanks a lot. Now for the next 30,000 questions. 🙂
 *  757872
 * [17 years, 11 months ago](https://wordpress.org/support/topic/adding-time-to-posts/#post-643032)
 * This is a dupe thread.. but here is the real answer I posted over here
 * [http://wordpress.org/support/topic/188857?replies=4](http://wordpress.org/support/topic/188857?replies=4)
 * Sorry I cant STAND when people dont answer the actual question asked but give
   you links to 50 different things
 * Here is “THE answer” for the next visitor that happens on this thread and gets
   confused.
 * go to THIS dir whereever it is
 * wp-content\themes\default
    (assuming default theme which if you are new like 
   I am.. thats what theme you are using)
 * the file in there marked index.php open it in a text editor.
 * find
 * <?php the_time(‘F jS, Y’) ?>
 * before it put this
 * Time posted: <?php the_time(‘g:i a’); ?>
    make sure there is a SPACE between 
   the > and the < or it will be jammed together.
 * if you want to put the time AFTER the date.. well then with a space.. put
 * Time posted: <?php the_time(‘g:i a’); ?>
 * behind
 * <?php the_time(‘F jS, Y’) ?>
 * so.. there you go.. if you want to know more.. check those links out.. but it
   is a simple problem with a simple solution.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding Time to Posts’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [time](https://wordpress.org/support/topic-tag/time/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: 757872
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/adding-time-to-posts/#post-643032)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
