Tagged: ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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,
    yu

    #597625

    Hi 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!
    Ismael

    #598003

    Link anbei.

    #600639

    Hi!

    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,
    Ismael

    #601222

    Hello 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
    yu

    #601756

    Hi!

    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,
    Ismael

    #602521

    Hi 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
    yu

    #603534

    Hey!

    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,
    Ismael

    #604351

    Hi 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
    yu

    #604919

    Hi!

    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,
    Ismael

    #605748

    Yepp, it works now. Thank you so much for your patience and your kind help.

    Cheers,
    yu

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Gravatar instead of video, gallery etc. icons on posts’ is closed to new replies.