WordPress

How to Display Author Biography on Every Post in WordPress

author details on WordPress

One of the fast growing stops for online blogs and webpages; WordPress has been catering to more and more number of requests to start on with webpages to casual blogs. And over time the layout as well as the tools and elements of WordPress has changed and in a way improved to suit best to the user.

If you have noticed, several blogs show the details of the author who wrote that particular post at the end of the article. You might also have noticed this on TheGeeksClub:

author details on WordPress

Here is how to do it on WordPress blogs.

From going multimedia to displaying ads as well as opening up to a whole new level of CSS style sheets, possibilities with WordPress are up to the user. With such tools and twists that can be discovered with each step in the CSS style sheets, the interface can not only be made simple and minimalistic but can also in the same time have interactive elements to make it come alive.

Add Author Biography to Blog Posts

Now moving onto the crux of the write-up, we have the option of adding a small note; say the author biography at the end of each post on WordPress. Although the idea would not be of much help and use for personal and single-user blogs, but for multi-user blogs, the idea is to increase the time viewers spend on the site by providing them the user info right along with the page instead of having to navigate to ‘about the author’ page.

To set it all up, the basic need is to do a teeny-weeny change to the theme files of your blog. To simplify it, we follow the steps below…

  1. To begin with one must fill out the user profile completely; i.e. in the author’s user profile for WordPress, the biography field must be filled up with the information one decides to show after each post.
  2. Next step is to understand the template tag:
    <?php the_author_description(); ?>

    It is important to note that this tag doesn’t accept any parameters and you should not employ any other alteration to it.

  3. The next step is to add the CSS class to the stylesheet of your theme and style it as you like. Once the styling is done, we are ready to make changes to the main theme file of the blog.
    .authorDetails { }
  4. So, next we browse into the index.php folder of the theme to locate the specific set of codes that control the biographical information for the blog; e.g.
    < ?php the_content('Read the rest of this entry »'); ?>

    Once the entry has been found, a minimal amount of alteration to it would help setup the code for the desired look.

  5. <div class="authorDetails"><?php the_author_description(); ?></div>

    The above code is to be placed right below the class of codes mentioned in the previous step.

  6. Once the codes are in place, removing the unnecessary spaces and running the blog up from the newly saved style sheets should show the author biographies below each post.

So now you can style the class authorDetails and give your author details section the proper decoration. Here is a sample for you –

.authorDetails {
  display: block;
  color: #333333;
  font: normal 14px Arial, Helvetica, sans-serif;
  background: #FAEFCF;
  border: 2px solid #CC9602;
  padding: 10px;
  margin:5px;
}

This is to give your the start that you need to show post author name, image, and other details. You can go on modifying the the_author_description() tag to add custom parameters like the author’s Facebook profile, Google Plus profile, Twitter account, etc which can give your blog much more professional look as well as your reader get to associate with your authors more closely. You can also use the template tag the_author_meta() where you get all the options under the profile of an author and show them separately on the page.

Check out more useful WordPress tutorials, tricks, and tips.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top