Forums

[resolved] [Plugin: Co-Authors] Listing multiple authors bug? (6 posts)

  1. snowcrash
    Member
    Posted 11 months ago #

    Hello

    This plugin is really important for making WP more professional.

    It seems to be almost working fine on WP2.7
    There's an issue with using coauthors_wp_list_authors()
    It does list authors with links, but this is only for the first author. The second or more authors do not show up. Even if you unhide them, their names remain no as links. This issue has been the case for previous versions of this plugin in earlier for earlier versions of WP.
    (Note, using coauthors_posts_links() works fine).

    thanks

  2. viter-z-bayraku
    Member
    Posted 10 months ago #

    you are fixed this issue or not? i have the same problem.

  3. snowcrash
    Member
    Posted 5 months ago #

    A bit of a hack, but this seems to fix the problem.

    In your plugins folder, go to co-authors folder, and edit co-authors.php

    Around line 471 find the code:

    if ( $posts == 0 ) {
    if ( !$hide_empty )
     $link = $name;
    }  else {

    And replace (using // to hide this code; or can delete instead) with:

    // if ( $posts == 0 )
    // if ( !$hide_empty )
    // $link = $name;
    // }  else {

    On line 508, replace (or delete):

    }

    with:

    // }

    hope this helps

  4. snowcrash
    Member
    Posted 5 months ago #

    Just to add, this hack only works if you set hide_empty=0 for the tag coauthors_wp_list_authors()

  5. webiaei
    Member
    Posted 5 months ago #

    Help! The hack still is not working for me. I've tried both adding the // and deleting those lines in the co-authors.php file. I tried to add the hide_empty=0 in the tag, but I'm not sure exactly where to do it (I put it in near the tag, but I think I did it wrong. Where exactly do I put that hide_empty=0?

    This is what I finally had the code as in the co-authors.php:

    function coauthors_wp_list_authors($args = ''){
    global $wpdb;

    $defaults = array(
    'optioncount' => false, 'exclude_admin' => true,
    'show_fullname' => false, 'hide_empty=0' => true,
    'feed' => '', 'feed_image' => '', 'echo ' => true
    );

    Is this what you are talking about?

    Thank you for the plug in by the way; it's worked great in the past (It's just stopped working with the latest upgrade in Wordpress).

  6. snowcrash
    Member
    Posted 5 months ago #

    I haven't tried the plugin with WP2.8, only with WP2.7.1

    You just need to add:

    coauthors_wp_list_authors('hide_empty=0');

    and this line of code would replace for instance:

    wp_list_authors();

Reply

You must log in to post.

About this Topic

Tags