Add Author Bio to Author Archives

This snippet adds the author's biography to the top of author archive pages, providing context for the author's posts.

PHP

function add_author_bio_to_archive() {
    if (is_author()) {
        echo '<div class="author-bio">';
        echo get_avatar(get_the_author_meta('ID'), 60);
        echo '<h3>' . get_the_author() . '</h3>';
        echo '<p>' . get_the_author_meta('description') . '</p>';
        echo '</div>';
    }
}
add_action('archive_template', 'add_author_bio_to_archive');

Snippet Feedback

Did this snippet work for you? Do you have any questions about this snippet? Leave some feedback below.

Did it work?

Save Snippet

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.

Embed Snippet

To embed this snippet on your site, copy this html code and paste into your webpage. Learn more
By embedding snippets on your site, you are agreeing to our terms and conditions.