WordPress.org

Ready to get started?Download WordPress

Forums

change entry meta in twentytwelve child theme (1 post)

  1. ndhelp
    Member
    Posted 1 year ago #

    I have a twentytwelve child theme that I'd like to change the entry meta layout of - from:
    Posted in category names on October 2, 2012 by author's name

    to:
    Posted July 27, 2012 by Author's name | Category 1, Category 10 (Parmalink:http://www.somewebsite.com/post-15/)

    notice the date is first (and the format), there's a pipe after author and the permalink is there. I am looking at this `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' ) );

    $date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a>',
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    esc_attr( get_the_date( 'c' ) ),
    esc_html( get_the_date() )
    );

    $author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),
    get_the_author()
    );
    ` but I don't understand it completely

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags