The code in this download folder adds the users profile details before the loop of posts on the author archive only if the user has a valid Gravatar. If not, the box is not shown as seen in the demo video.
It displays :
- The users avatar if added. If not added, the code does not execute and the following profile details are not shown.
- The users display name.
- The users Biographical Info.
- A link to the users website.
Demo Video
Shows the users author box displaying before the author archive loop if they are using a valid gravatar email address otherwise the details are not shown.
Tested using a Divi child theme with the Divi parent theme by Elegant Themes.
Installation Steps
There’s 3 steps :
- # Upload the author.php file to your Divi child theme folder like this
- # Copy & paste the PHP code ( without the opening PHP tag ) to the end of your child themes functions file.
- # Copy & paste the CSS to the end of your Divi child themes style.css file and clear caching.
Remove Check For Gravatar Image
If you don’t want to check if the author has a gravatar, remove the following line of code from the PHP code on line 59 of the functions file inside the download folder.
And remove the 1st closing endif
keyword.
Was This Tutorial Helpful?