Forums

[resolved] Formatting the "date" "time" and "author" in TwentyTen (1 post)

  1. chrischickenwire
    Member
    Posted 1 year ago #

    Hi there,

    I'm using a modified version of the TwentyTen theme for my profile. I would like to format the date/time/author on the main posts to match the format that I have set for my other pages. The posts page is http://www.rjt-online.com/blog-archive

    The problem is, it looks like I have to do this in the functions.php file. I don't really understand how to edit it.

    This is the code:

    function twentyten_posted_on() {
    	printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
    		'meta-prep meta-prep-author',
    		sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
    			get_permalink(),
    			esc_attr( get_the_time() ),
    			get_the_date()
    		),
    		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
    			get_author_posts_url( get_the_author_meta( 'ID' ) ),
    			sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    			get_the_author()
    		)
    	);
    }
    endif;

    I would like to style it like on the other pages (for example http://www.rjt-online.com/blog). So basically I'd be happy with removing the links from the date line in the post page.

    For the other pages I added this code into the templates but I can't seem to do this with the main posts page:

    <div class="entry-meta">
    						Posted on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> by <?php the_author() ?>
    					</div><!-- .entry-meta -->

Topic Closed

This topic has been closed to new replies.

About this Topic