How to Add a Author Bio Box to WordPress Posts

Displaying an author bio box at the end of your blog posts is a wonderful way to provide readers with more information about the author, improve engagement, and build a personal connection between the author and the audience. This can be especially important for blogs with multiple authors, as it helps highlight individual contributors and their expertise.

Add below code snippet to the functions.php file of your theme to add a custom author bio box to your WordPress posts. This box will display the author's profile picture, name, and biography at the end of every single post.

// Display Author Bio box after the post content
function themesdna_author_bio_box($content) {
    if (is_single() && get_the_author_meta('description')) {
        $author_bio = '<div class="tdna-ab-box">';
        $author_bio .= get_avatar(get_the_author_meta('ID'), 100); // Display author profile picture
        $author_bio .= '<div class="tdna-ab-details"><h4 class="tdna-ab-name">' . get_the_author_meta('display_name') . '</h4>'; // Display author name
        $author_bio .= '<div class="tdna-ab-description">' . get_the_author_meta('description') . '</div></div>'; // Display author bio
        $author_bio .= '</div>';
        $content .= $author_bio;
    }
    return $content;
}
add_filter('the_content', 'themesdna_author_bio_box');

// Add CSS for the author bio box
function themesdna_author_bio_css() {
    echo '
    <style>
    .tdna-ab-box {
        margin: 20px 0;
        padding: 10px;
        background: #f9f9f9;
        border: 1px solid #ddd;
        display: -webkit-box;
        display: -webkit-flex;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
           -moz-box-align: center;
            -ms-flex-align: center;
                align-items: center;
    }
    .tdna-ab-box img {
        -webkit-border-radius: 50%;
           -moz-border-radius: 50%;
                border-radius: 50%;
        margin-right: 20px;
    }
    .tdna-ab-box h4 {
        margin: 0 0 10px;
        font-size: 1.5em;
    }
    .tdna-ab-description {
        margin: 0;
    }
    </style>
    ';
}
add_action('wp_head', 'themesdna_author_bio_css');

Note: To take full advantage of this feature, make sure each author on your site has a completed bio. You can add this by going to the WordPress admin panel:

1. Navigate to Users > Profile.
2. Fill in the "Biographical Info" section with the author’s bio.
3. Optionally, you can upload a profile picture by associating the email with a Gravatar account.

Our WordPress Themes

Below are some of our premium WordPress themes. View all our free and premium WordPress themes →
PowerWP PRO WordPress Theme

PowerWP PRO

If you like PowerWP free WordPress Theme, you will love the premium version. PowerWP PRO is an easy to use,...

$25.00
CoolWP PRO WordPress Theme

CoolWP PRO

If you like CoolWP free WordPress Theme, you will love the premium version. CoolWP PRO is very user friendly, feature-rich,...

$25.00
MintWP PRO WordPress Theme

MintWP PRO

If you like free version of MintWP WordPress Theme, you will love the premium version. MintWP PRO is an improved...

$25.00
FineWP PRO WordPress Theme

FineWP PRO

If you like free version of FineWP WordPress Theme, you will love the premium version. FineWP PRO is an improved...

$25.00
CuteWP PRO WordPress Theme

CuteWP PRO

If you like CuteWP free WordPress Theme, you will love the premium version. CuteWP PRO is an improved version of...

$25.00
GridMe PRO WordPress Theme

GridMe PRO

If you have tried GridMe Free WordPress Theme, then you will love the premium version. It will help you to...

$25.00
BoxWP PRO WordPress Theme

BoxWP PRO

If you like BoxWP free WordPress Theme, you will love the premium version. BoxWP PRO is an elegant, user-friendly, feature-rich,...

$25.00
GridFeel PRO WordPress Theme

GridFeel PRO

$25.00

Can't you choose a single theme? Purchase All Themes for $75.

Save money with our low, one-time price for access to all of our 55 WordPress themes.