Title: Adding published date just before post &#8230;
Last modified: August 19, 2016

---

# Adding published date just before post …

 *  [Revived](https://wordpress.org/support/users/revived/)
 * (@revived)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/)
 * How do you add the published date just before a post … within the first <p> tag?

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740385)
 * one example
 *     ```
       <p><?php the_time('m.d.y') ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
       ```
   
 * Also see [the_time()](http://codex.wordpress.org/Template_Tags/the_time) for 
   more formatting choices
 *  Thread Starter [Revived](https://wordpress.org/support/users/revived/)
 * (@revived)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740401)
 * To clarify, I meant having the date just before the body of the post, not the
   title.
 * For instance:
 * <h2>Here’s the title of the post</h2>
 * <p>(DATE) – And here’s the post body …</p>
 * <p>Another paragraph …</p>
 * <p>…</p>
 * Comments area
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740402)
 * So find where `the_content()` is used and put something like
 *     ```
       <?php the_time('m.d.y') ?>
       ```
   
 *  Thread Starter [Revived](https://wordpress.org/support/users/revived/)
 * (@revived)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740404)
 * I’ve searched for every instance of the_content() and I cannot figure out how
   to make the date appear where I’ve illustrated above. Can you be more specific?
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740420)
 * With the help of the [Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy)
   article, determine what [Template](http://codex.wordpress.org/Templates) is displaying
   your posts (could be your theme’s index.php).
 * Then look for the [template tag](http://codex.wordpress.org/Template_Tags), [the_content()](http://codex.wordpress.org/Template_Tags/the_content).
 * If you are not currently displaying the whole post content then you may not find
   the_content.
 * If necessary use [http://wingrep.com](http://wingrep.com) on a local copy of 
   your theme to find the_content.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740473)
 * `<?php echo apply_filters('the_content','('.get_the_time('m.d.y').') - '.get_the_content());?
   >`
 * [http://codex.wordpress.org/Function_Reference/get_the_time](http://codex.wordpress.org/Function_Reference/get_the_time)
   
   [http://codex.wordpress.org/Function_Reference/get_the_content](http://codex.wordpress.org/Function_Reference/get_the_content)
   [http://codex.wordpress.org/Function_Reference/apply_filters](http://codex.wordpress.org/Function_Reference/apply_filters)
 *  Thread Starter [Revived](https://wordpress.org/support/users/revived/)
 * (@revived)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740481)
 * Alchymyth,
 * Would would that be placed?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740496)
 * instead of `<?php the_content(); ?>`
    in each template file of your theme where
   you want to show this construct – index.php, single.php, archive.php .. (?)
 *  Thread Starter [Revived](https://wordpress.org/support/users/revived/)
 * (@revived)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740518)
 * Unfortunately, that didn’t work. It placed the date before the first <p> tag:
 * (Oct.22.2010) –
    <p>
 * Is there a way to force it just before that opening <p>?

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

The topic ‘Adding published date just before post …’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: [Revived](https://wordpress.org/support/users/revived/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/adding-published-date-just-before-post/#post-1740518)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
