Title: title and date
Last modified: August 19, 2016

---

# title and date

 *  [barrykins](https://wordpress.org/support/users/barrykins/)
 * (@barrykins)
 * [17 years ago](https://wordpress.org/support/topic/title-and-date/)
 * I’m mesing around with the layout and I’d like the date posted right underneath
   the title. The title php is in a div aligned to the right and H2 brackets surronding
   it. I’d like the date right bellow the title with little ornot space but when
   I put the date bellow it in the index file, it leaves a space like it would when
   pressed enter
 * For ex.
 * Title
 * Date
    (That’s what it looks like.)
 * I want
 * Title
    Date

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

 *  [mrdthomas](https://wordpress.org/support/users/mrdthomas/)
 * (@mrdthomas)
 * [17 years ago](https://wordpress.org/support/topic/title-and-date/#post-1174713)
 * Did you check the styles applied to those elements? Sounds like padding or margins
   are creating the extra space.
 *  Thread Starter [barrykins](https://wordpress.org/support/users/barrykins/)
 * (@barrykins)
 * [17 years ago](https://wordpress.org/support/topic/title-and-date/#post-1174717)
 * And a question about the styles. What would the style be applied to? The div 
   class? Or div ID? But no I didn’t check that yet. Ill give it a try.
 *  Thread Starter [barrykins](https://wordpress.org/support/users/barrykins/)
 * (@barrykins)
 * [17 years ago](https://wordpress.org/support/topic/title-and-date/#post-1174719)
 * The code is.
 *     ```
       <div class="title" align="left"><h2><?php the_title() ?></h2>
       <?php the_time('M j, Y') ?>
       ```
   
 * Then it goes into a div for the_content and after that it closes both divs
 *  [mrdthomas](https://wordpress.org/support/users/mrdthomas/)
 * (@mrdthomas)
 * [17 years ago](https://wordpress.org/support/topic/title-and-date/#post-1174746)
 * You should check the title class and also the h2 style if its defined in the 
   style sheet.

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

The topic ‘title and date’ is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [mrdthomas](https://wordpress.org/support/users/mrdthomas/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/title-and-date/#post-1174746)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
