WordPress.org

Forums

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

  1. skyslasher
    Member
    Posted 2 years 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 2 years 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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Co-Authors Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.