diff --git a/inc/template-tags.php b/inc/template-tags.php index f11c464..6384aef 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -75,17 +75,27 @@ function cs_posted_on() { esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); - - printf( __( 'Posted on %1$s by %2$s', 'cs' ), - sprintf( '%2$s', - esc_url( get_permalink() ), - $time_string - ), - sprintf( '%2$s', - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), - esc_html( get_the_author() ) - ) - ); + + if ( function_exists( 'coauthors_posts_links' ) ) : + printf( __( 'Posted on %1$s by %2$s', 'cs' ), + sprintf( '%2$s', + esc_url( get_permalink() ), + $time_string + ), + coauthors_posts_links( null, null, null, null, false ) + ); + else: + printf( __( 'Posted on %1$s by %2$s', 'cs' ), + sprintf( '%2$s', + esc_url( get_permalink() ), + $time_string + ), + sprintf( '%2$s', + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + esc_html( get_the_author() ) + ) + ); + endif; } endif;