WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] Display Multiple Authors in my theme (2 posts)

  1. B_Dark
    Member
    Posted 1 year ago #

    in my loop-single.php of my theme i have this code for infos (author,date,category,comments,edit post)

    <p class="site-meta-data"><?php printf(__( 'Posted by %1$s on %2$s %3$s · %4$s', 'wpsite' ), sprintf( '<a class="url fn n" href="%1$s" title="%2$s">%3$s</a>', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf(esc_attr__( 'View all posts by %s', 'wpsite' ), get_the_author() ), get_the_author()), get_the_date(), (!is_attachment() )? sprintf( __( 'in %1$s', 'wpsite' ), get_the_category_list( ', ' ) ) : '', sprintf(__( '<a href="#comments">%1$u Comments</a>', 'wpsite' ), get_comments_number())); edit_post_link( __( 'Edit entry', 'wpsite' ), ' · ');?></p>

    how can i fix it with Co-Authors Plus?

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    You can replace:

    sprintf( '<a class="url fn n" href="%1$s" title="%2$s">%3$s</a>', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf(esc_attr__( 'View all posts by %s', 'wpsite' ), get_the_author() ), get_the_author())

    with:

    coauthors_posts_links( null, null, null, null, false )

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.