The code in this download folder displays the author avatar ( user profile picture ) perfectly inline with the post meta using CSS grid.
The author avatar is added on the User Profile edit screen. If none added, the default post meta displays like this :
The author profile image upload field can be added using the 3rd party plugin named Simple Local Avatars or the Guest Author plugin.
Make sure you enable post info using Divi Theme Options > Layout > Single Post Layout > Choose which items to display in the post info section.
Shows the author profile image displaying inline with the post meta on single posts if the image has been added otherwise outputs the default post meta without the users profile image.
Tested using Divi by Elegant Themes.
There’s 3 steps :
- # If using the Simple Local Avatars plugin, copy & paste the PHP code ( without the opening PHP tag ) from the functions.php file to the end of your Divi child themes functions file. If using the Guest Author plugin, use the code from the functions-2.php file.
- # Upload the single.php file to your divi child theme folder like this :
- # Copy & paste the CSS from the style.css file to the end of your Divi child themes style.css file and clear caching.