Support » Themes and Templates » TwentyTwelve – move entry meta date to top of post

Viewing 5 replies - 1 through 5 (of 5 total)
  • Ok I removed the date stamp from the entry meta in functions on a child theme, and I added the date stamp (without a link) (permalink) to just under the title to the right by adding as styled div to content.php with a call for the date.

    This is exactly what I’d like to do, any chance you could be a bit more detailed in how you achived it?

    Thanks

    Ok, in content.php in your child theme find this section in the header area:

    <header class="entry-header">
    			<?php the_post_thumbnail(); ?>
    			<?php if ( is_single() ) : ?>
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    <div class="title-date"><?php the_time('l - j F Y') ?></div>
    			<?php else : ?>
    			<h1 class="entry-title">

    See the line:
    <div class="title-date"><?php the_time('l - j F Y') ?></div>

    That is a styled div to give me the time stamp to the right of the title, one line below.

    And this is what I have in child theme in functions for enty meta:

    if ( ! function_exists( 'twentytwelve_entry_meta' ) ) :
    /**
     * Prints HTML with meta information for current post: categories, tags, permalink, author, and date.
     *
     * Create your own twentytwelve_entry_meta() to override in a child theme.
     *
     * @since Twenty Twelve 1.0
     */
    function twentytwelve_entry_meta() {
    	// Translators: used between list items, there is a space after the comma.
    	$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
    
    	// Translators: used between list items, there is a space after the comma.
    	$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
    
    	// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
    	if ( $tag_list ) {
    		$utility_text = __( 'This entry was posted in %1$s and tagged %2$s. || ', 'twentytwelve' );
    	} elseif ( $categories_list ) {
    		$utility_text = __( 'This entry was posted in %1$s. || ', 'twentytwelve' );
    	} 
    
    	printf(
    		$utility_text,
    		$categories_list,
    		$tag_list,
    		$date,
    		$author
    	);
    }
    endif;

    Now you need to be careful here, as I did what I needed for my blog, you may want different.
    Sorry to post back so late, lost sight of this one.

    How do you do this in a child theme (using twenty twelve)?

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    You can ask this on your own thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘TwentyTwelve – move entry meta date to top of post’ is closed to new replies.