Support » Theme: Twenty Twelve » 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 (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

    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 – please continue with it]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Help with date coding and styling’ is closed to new replies.