How to add coauthors in (child) theme twenty-twelve
-
Hi guys,
I have just created a webpage (link here) that uses a child theme of twenty-twelve. I was trying to include coauthors (I have installed coauthors plus) in entry-meta (which, as it is now and I want it to be, it only displays the author of the post and the date), but I don’t know how to do that, my skills are not enough. Whatever help would be deeply appreciated! Code is below.
Many thanks in advance.
*/
function twentytwelve_entry_meta() {
// Translators: used between list items, there is a space after the comma.
$author = sprintf( ‘<span class=”author vcard”>%3$s</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()
);$date = sprintf( ‘<time class=”entry-date” datetime=”%3$s”>%4$s</time>‘,
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( ‘c’ ) ),
esc_html( get_the_date() )
);$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 author, 2 is date, 3 is the category and 4 is tag.
$utility_text = __( ‘Posted <span class=”by-author”> by %1$s</span> on %2$s’, ‘twentytwelve’ );
printf(
$utility_text,
$author,
$date
);
}
endif;if ( ! function_exists( ‘twentytwelve_entry_meta2’ ) ) :
/**
- The topic ‘How to add coauthors in (child) theme twenty-twelve’ is closed to new replies.