WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[closed] Help with date coding and styling (2 posts)

  1. kerflop
    Member
    Posted 1 year ago #

    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]

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    you can see all your topics when you click on the 'Member' link below your username here in the forum.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic