showing date only (w/o permalink) on posts in loop
-
I’ve found out how to remove the date/time and author from posts in functions,php and display only the date on a single post, now it would be nice to have that on the front page (the loop) as well. I’m running a child theme of twenty ten.
everything I try to insert here to just show the date, other than leaving it completely blank, thus not showing anything at all, comes up with an error:if ( ! function_exists( ‘twentyten_posted_on’ ) ) :
/**
* Prints HTML with meta information for the current post—date/time and author.
*
* @since Twenty Ten 1.0
*/
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( ‘<span class=”entry-date”>%3$s</span>‘,
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
),
sprintf( ‘<span class=”author vcard”>%3$s</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;modifying the loop hasn’t worked either.
any help?
- The topic ‘showing date only (w/o permalink) on posts in loop’ is closed to new replies.