Title: Help with date coding and styling
Last modified: August 20, 2016

---

# Help with date coding and styling

 *  [jessica](https://wordpress.org/support/users/kerflop/)
 * (@kerflop)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/help-with-date-coding-and-styling/)
 * I’m so sorry if this is a duplicate, I don’t know where my other post went. Please
   feel free to delete it if it shows up somewhere.
 * —–
 * Hello,
 * I’m trying to figure out how to get the date to show up to the left of the post
   title, styled a certain way. I got this to work on a genesis theme, but I’m new
   to twentytwelve and can’t quite seem to sort it out.
 * Here’s the code in a genesis (prose) theme that worked nicely before:
 *     ```
       add_action( 'genesis_before_post_title', 'child_before_post_title' );
       function child_before_post_title() {
          if ( ! is_page() ) { ?>
   
          <div class="entry-meta">
               <span class='day'><?php the_time('j');?></span>
                <span class='month'><br/><?php the_time('M'); ?></span>
            </div>
   
          <?php }
       }
       ```
   
 * That, with some CSS of course, resulted in this: [http://elevensixty.com/date-comment.png](http://elevensixty.com/date-comment.png)(
   minus the comment stuff which I did elsewhere). The code also made sure the date
   only showed on post pages, not static pages where it wasn’t needed.
 * In twentytwelve, I am trying to accomplish something similar. Here is a screen
   capture from the PSD file to show you what I’m aiming for: [http://elevensixty.com/date.png](http://elevensixty.com/date.png)
 * I believe I need help with the action part, I’m not sure what the right code 
   is.
 * Thank you!
 * _[indeed a duplicate – your original is here: [http://wordpress.org/support/topic/theme-twentytwelve-help-with-date-coding-and-styling?replies=1](http://wordpress.org/support/topic/theme-twentytwelve-help-with-date-coding-and-styling?replies=1)–
   please continue with it]_

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/help-with-date-coding-and-styling/#post-3419436)
 * you can see all your topics when you click on the [‘Member’](http://wordpress.org/support/profile/kerflop)
   link below your username here in the forum.

Viewing 1 replies (of 1 total)

The topic ‘Help with date coding and styling’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentytwelve/4.8/screenshot.png)
 * Twenty Twelve
 * [Support Threads](https://wordpress.org/support/theme/twentytwelve/)
 * [Active Topics](https://wordpress.org/support/theme/twentytwelve/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentytwelve/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentytwelve/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/help-with-date-coding-and-styling/#post-3419436)
 * Status: not resolved