WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
Bug in function coauthors_posts_links_single() (2 posts)

  1. skyslasher
    Member
    Posted 11 months ago #

    Hi,

    I discovered a bug in the function coauthors_posts_links_single(). The function always returns the display name of the first co-author. To correct this, edit

    template-tags.php
    and replace

    'title' => sprintf( __( 'Posts by %s', 'co-authors-plus' ), get_the_author() ),
    'text' => get_the_author(),

    with

    'title' => sprintf( __( 'Posts by %s', 'co-authors-plus' ), get_the_author_meta('display_name', $author->ID) ),
    'text' => get_the_author_meta('display_name', $author->ID),

    Cheers,
    Andreas

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

  2. skyslasher
    Member
    Posted 11 months ago #

    Update:

    to get it working with guest accounts, replace the above with

    'title' => sprintf( __( 'Posts by %s', 'co-authors-plus' ), $author->display_name ),
    'text' => $author->display_name,

    Cheers,
    Andreas

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.