• Hello there, we have co-authors plus and when a post has multiple authors, it will show in most cases. However, when both, or more than one of the authors has an ‘editor’ role, only one of those with the role will display on the article.

    We are using a theme based on newspack and I’ve looked at the code where authors are being parsed in inc/template-tags.php and it appears to correctly use the plugin functions :

    <span class="byline">
    
    <span><?php echo esc_html__( 'by', 'newspack' ); ?></span>
    
    <?php
    
    foreach ( $authors as $author ) {
    
    $i++;
    
    if ( $author_count === $i ) :
    
    /* translators: separates last two names; needs a space on either side. */
    
    $sep = esc_html__( ' and ', 'newspack' );
    
    elseif ( $author_count > $i ) :
    
    /* translators: separates all but the last two names; needs a space at the end. */
    
    $sep = esc_html__( ', ', 'newspack' );
    
    else :
    
    $sep = '';
    
    endif;
    
    printf(
    
    /* translators: 1: author link. 2: author name. 3. variable seperator (comma, 'and', or empty) */
    
    '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>%3$s ',
    
    esc_url( get_author_posts_url( $author->ID, $author->user_nicename ) ),
    
    esc_html( $author->display_name ),
    
    esc_html( $sep )
    
    );
    
    }
    
    ?>
    
    </span><!-- .byline -->

Viewing 1 replies (of 1 total)
  • Thread Starter mrbryan

    (@mrbryan)

    Hello plug-in authors, I believe I’ve shown that this is set up correctly but your plug-in is not treating all roles as potential authors via the function suggested in your documentation.

    Will you help diagnose this?

Viewing 1 replies (of 1 total)
  • The topic ‘Only one co-author showing when editor role’ is closed to new replies.