Add Automatic Author Footer to WordPress Posts - Easy Guide

Automating Author Footers in WordPress
Launching a blog may seem straightforward. Installing WordPress and selecting a theme are initial steps, but customization is often required.
Personalization extends beyond aesthetics. For instance, your WordPress profile might lack a desired image, necessitating a Gravatar account. Similarly, comment placement may require adjustments to the underlying PHP code.
The Need for Clear Instructions
Having encountered numerous customization challenges, it’s beneficial to possess a well-defined guide for specific tasks. This article details how to implement a dynamic author biography footer for each post.
The goal is to automatically display a unique footer at the end of every blog post. This footer will be tailored to the author of that specific entry.
How it Works
This process leverages the information already provided within each user’s profile in the WordPress admin panel. Specifically, it utilizes the biography details entered by each author.
Furthermore, the system will display the Gravatar image associated with the author’s email address. This ensures a visual representation alongside the biographical information, dynamically changing the footer credit on your WordPress site.
Essentially, the system pulls the author's bio and associated image to create a customized footer for each post.
Implementing PHP Tags for Post Footers
Modifying a single PHP file within your WordPress theme is all that’s required to achieve this functionality. Specifically, the single.php file is the one you’ll need to edit. This file is responsible for controlling how individual posts are displayed on your website.
Dynamic PHP tags will be inserted into this file to generate a consistent footer across all posts. The following PHP functions will be utilized in this process.
- get_the_author_email() - Retrieves the email address associated with the post’s author, as stored in their user profile.
- the_author_description() - Displays the biographical description provided by the author within their user profile.
- the_author() - Outputs the author’s displayed name, typically their nickname.
- the_user_posts() - Returns the total number of posts published by the specified user.
It’s important to note that all of this author information is managed directly by the users themselves through their individual profile pages within the WordPress administration area.
Provided users utilize the same email address for both their WordPress profile and their Gravatar account, their corresponding profile picture will be automatically displayed.
The author’s name is sourced from the "Nickname" field, while the biographical information is taken from the "Biographical Info" field. Complete and accurate entries in these fields are essential for the proper functioning of the post footer bio.
Modifying Your WordPress Theme Code
Implementing this customization doesn't require prior coding experience. Access your web hosting account and navigate to the file manager. Locate the PHP files within your theme's directory, specifically searching for single.php. This file is typically found in WP-content/themes, followed by your active theme’s folder.
Open single.php using a text editor. Utilize the search function to find the line containing "php the_content". The code snippet will appear as shown below.

Proceed to the end of this line and press Enter to create a new line. This ensures the subsequent code is inserted immediately after the post's content, guaranteeing the footer information is displayed directly afterward. This process is remarkably straightforward.
The next step involves constructing the author bio footer, component by component. Begin with the avatar image and conclude with the post count. Simply copy and paste the following code block to complete this setup.
<?php $author_email = get_the_author_email () ;
echo get_avatar ($author_email, '80') ; ?></span>
<br><p><i><?php the_author_description () ; ?>
<?php the_author() ; ?> has <?php the_author_posts () ; ?>
post(s) at NAME OF WEBSITE</i></p>
<div style="clear:both;"></div>
To visually separate the content from the author bio, a dividing line was added, consisting of "*****" followed by a line break. Examining the code sequentially reveals the construction of the bio footer. Initially, the email address is retrieved from the user’s profile.
This email is then used to fetch the author’s avatar from the Gravatar image service. Subsequently, the author’s description is extracted from their profile and displayed, followed by the total number of posts they have authored.
You have the flexibility to incorporate custom formatting, such as bold or italic text, and add any additional text you desire. The following image illustrates the appearance of the footer after publishing a post.

The arrows highlight the elements represented by variables – the author’s photo, description, post count, and name. By utilizing these variables, you can customize the footer bio’s appearance. The information is dynamically populated from the corresponding user profile.
This process is entirely automated and compatible with most WordPress blogs and themes. Feel free to experiment with this method (remembering to back up your original single.php file as a precaution) and share your experiences. Are there alternative approaches to displaying author bio information in the post footer? Share your insights in the comments below.
Related Posts

Phonetic Alphabet: Translate to Phonetic Alphabets Online

TuneIn Online Radio - Listen to Music, Sports & Talk Shows

10 Best Budget Travel Sites for Backpacking Trips

Turn Your Browser Into A Music Player - Easy Guide

Hard Drive Prices Rise Due to Thailand Flooding - News
