ThemeShaper Forums » Thematic

[closed]

Link to author archive page from single post "author box"

(1 post)
  • Started 12 years ago by eilza49
  • This topic is not resolved
  1. Hi,

    I have added an author bio box to the bottom of the single post page (as here http://forums.themeshaper.com/topic/customizing-author-info).

    At the end of the author bio box, I'd like to add a line of text which links to the author archive page, for example:

    Read more by (author).

    So, now, the function code looks like the one suggested in the above quoted thread by Chris:

    function childtheme_postfooter($content) {
    // we want the author's bio only on a single post
    if (is_single()) {
    $content .= "\n";
    $content .= "\t";
    // the whole class containing everything
    $content .= '<div class="author_info">' . "\n";
    $content .= "\t" . "\t";
    // the class containing the gravatar
    $content .= '<div class="author_gravatar">' . "\n";
    $content .= "\t" . "\t" . "\t";
    $content .= str_replace( "class='avatar", "class='photo avatar", get_avatar(get_the_author_email()) ) . "\n";
    $content .= "\t" . "\t";
    $content .= '</div> <!-- #author_gravatar -->' . "\n";
    $content .= "\t" . "\t";
    // the class containing the author's name and bio
    $content .= '<div class="author_bio">' . "\n";
    $content .= "\t" . "\t" . "\t";
    // we're getting the name
    $content .= '' . get_the_author() . '' . "\n";
    $content .= "\t" . "\t" . "\t";
    // we're getting the bio
    $content .= get_the_author_description() . "\n";
    $content .= "\t" . "\t";
    $content .= '</div> <!-- #author_bio -->' . "\n";
    $content .= "\t";
    $content .= '</div> <!-- #author_info -->' . "\n";
    }
    // we need to return the postfooter content anyway
    return $content;
    }
    // add the filter function to the main function
    add_filter('thematic_postfooter', 'childtheme_postfooter');

    How can I add the link to the author archives?

    Many thanks for your help.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.