• Hi again,
    I’m making a page of the list of authors (using PHP and template tag wp_list_authors).
    I would like to add next to their names their description from their profile (i know the template tag for description) – but how can I do this if I am not adding each author individually? I know there are no parameters that can do this. Maybe a hack?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter eeh212

    (@eeh212)

    Anyone?

    I would love to see a plugin for this.. maybe I’ll do it at some point..but not now..

    Okay so I went ahead and hacked it.. I know this could be turned into a simple plugin and if someone decides to create one using this please let me know. I just didn’t have the time. To use my hack you need to install the “Get Author Profile” plugin by Kaf Oseo… I noted this in the code.

    Below is the hack to /wp-includes/template-functions-author.php
    version
    I hacked the very last “if” statement on the page (line 229).

    To use it simply replace this code:
    if ( !($posts == 0 && $hide_empty) )
    echo "$link</li>";
    }
    }
    ?>

    With this new and improved code that includes my hack:


    /* Kole Hicks ... made the $link bold and added a page break www.kolehicks.com
    You need "Get Author Profile" plugin By Kaf Oseo. for this hack to work http://guff.szub.net/plugins/
    You can see it implemented on http://www.peachpitcommons.com/?page_id=209
    */
    if ( !($posts == 0 && $hide_empty) )
    echo "<strong>$link" . "</strong><br/>";
    // Kole Hicks ... added get_author_profile function and a used $hide_empty to the for each
    get_author_profile($author->ID);
    if ( $posts == 0 ) {
    if ( !$hide_empty )
    author_profile( 'profile' );
    } else {
    author_profile( 'profile' );
    echo "
    "; }
    }
    }
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding description to list of authors’ is closed to new replies.