-
AuthorPosts
-
March 9, 2016 at 2:46 pm #595580
Hello,
is there an easy way to substitute the video, gallery etc. icons in blog posts with the gravatar of the author? In which file of your theme would I need to do the change?
Cheers,
yuMarch 14, 2016 at 9:42 am #597625Hi YU-Design!
Thank you for using Enfold.
Could you please provide a link to the page? You can modify the includes > loop-index.php file.
Cheers!
IsmaelMarch 14, 2016 at 10:03 pm #598003Link anbei.
March 19, 2016 at 9:29 am #600639Hi!
The gravatars are showing up for other authors but it will be replaced with an icon if the author is not registered or do not have a gravatar account.
Regards,
IsmaelMarch 21, 2016 at 1:51 pm #601222Hello Ismael,
thanks for your reply.
The authors do all have gravatars. I can see them when I switch the post format from video/gallery etc. to standard.
The gravatars are just replaced by icons when I don’t use STANDARD posts. Where can I stop this logic to happen?
Cheers
yuMarch 22, 2016 at 9:08 am #601756Hi!
Are you sure that they have a gravatar account? I checked the markup and the gravatar image is missing which means that the current account or author doesn’t have a gravatar account. You can find the script in the includes > loop-index.php file, line 136:
$blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>".$gravatar.$icon."</span></a>";
If a gravatar image is available, it will cover the icon.
Best regards,
IsmaelMarch 23, 2016 at 2:45 pm #602521Hi Ismael,
as mentioned before the gravatar image exists, I can see it in every standard post.
But it’s true, I don’t use gravatar accounts, but a plugin –> Simple Local Avatars. To make sure the issue is not caused by the plugin I added a author with a real gravatar account and added two posts to it, one video, one standard. See link in private content.
Cheers
yuMarch 25, 2016 at 4:12 am #603534Hey!
Thank you for the info. I can see the issue now. Please edit includes > loop-index.php file then look for this code around line 126:
if($post_format !== 'standard')
.. replace it with:
if($post_format !== '')
Regards,
IsmaelMarch 29, 2016 at 10:49 am #604351Hi Ismael,
perfect, now we are talking about the same thing :) I tried your suggestion but exactly the opposite of what I need happened: Instead of having the avatar image on every post format, I get no avatar image at all but only icons….
Cheers
yuMarch 30, 2016 at 4:42 am #604919Hi!
That’s weird. We told the theme to apply the gravatar if the post format isn’t blank. Is the blog style set to multi author? If not, please set it to multi author. Replace the conditional statement in the loop-index.php file:
if($post_format == 'standard' || $post_format != '')
Regards,
IsmaelMarch 31, 2016 at 10:13 am #605748Yepp, it works now. Thank you so much for your patience and your kind help.
Cheers,
yu -
AuthorPosts
- The topic ‘Gravatar instead of video, gallery etc. icons on posts’ is closed to new replies.