Only a writer knows how many time, effort and skill required for good writing. You should want to show to your visitors, who have written these articles. The author bio box also increases the authenticity of your blog. The visitor most of the time wants to know who is writing this blogs or the specific articles. This also builds trust with your readers. You also manage multiple authors on a blog.

In this article, I will show you how you can add an author bio box in your WordPress posts. I will show you three specific ways.

  1. Those themes that already have an author box
  2. Using WordPress plugins
  3.  Directly edit theme’s code

1. Theme with author bio box: 

With author bio functionality some themes automatically come. So my first recommendation is to choose such a theme which have the built-in author box. Don’t so so strict in this. If you already choose a design which not have the built-in author box then you can do in another 2 ways that I will show you also in this article.

2. Using Plugins:

Some WordPress users use WordPress for the easy uses of plugins. For this problem of adding author bio to a post you can also use a plugin. There are a lot of plugins for the author bio box. Here I am adding a little amount.

. Starbox

. Fancier Author Box

. Simple Author Box

These three is used by me and among all other, I like these 3 mostly. Before choosing plugins one important thing keep in mind that don’t choose a plugin by his outlook. Choose it depending upon its functionality. Any kind of design you can change later.

By adding codes to the site.

This is for the developers. If you are not frequent with codes then you should hire a good developer of to communicate with a software company like Infonex software International Limited. In this tutorial I am sharing the codes also that you have to add to the theme codes.

function wpb_author_info_box( $content ) {

global $post;

// Detect if it is a single post with a post author

if ( is_single() && isset( $post->post_author ) ) {

// Get author’s display name

$display_name = get_the_author_meta( ‘display_name’, $post->post_author );

// If display name is not available then use nickname as display name

if ( empty( $display_name ) )

$display_name = get_the_author_meta( ‘nickname’, $post->post_author );

// Get author’s biographical information or description

$user_description = get_the_author_meta( ‘user_description’, $post->post_author );

// Get author’s website URL

$user_website = get_the_author_meta(‘url’, $post->post_author);

// Get link to the author archive page

$user_posts = get_author_posts_url( get_the_author_meta( ‘ID’ , $post->post_author));

if ( ! empty( $display_name ) )

$author_details = ‘<p class=”author_name”>About ‘ . $display_name . ‘</p>’;

if ( ! empty( $user_description ) )

// Author avatar and bio

$author_details .= ‘<p class=”author_details”>’ . get_avatar( get_the_author_meta(‘user_email’) , 90 ) . nl2br( $user_description ). ‘</p>’;

$author_details .= ‘<p class=”author_links”><a href=”’. $user_posts .’”>View all posts by ‘ . $display_name . ‘</a>’;

// Check if author has a website in their profile

if ( ! empty( $user_website ) ) {

// Display author website link

$author_details .= ‘ | <a href=”’ . $user_website .’” target=”_blank” rel=”nofollow”>Website</a></p>’;

} else {

// if there is no author website then just close the paragraph

$author_details .= ‘</p>’;

}

// Pass all this info to post content

$content = $content . ‘<footer class=”author_bio_section” >’ . $author_details . ‘</footer>’;

}

return $content;

}

// Add our function to the post content filter

add_action( ‘the_content’, ‘wpb_author_info_box’ );

// Allow HTML in author bio section

remove_filter(‘pre_user_description’, ‘wp_filter_kses’);

In this code I did not added any design portions. You can add any kind of css properties to design it.

NO COMMENTS

LEAVE A REPLY