Blog, Website & Page Publishing

GillBraysh
Participante

Blog Avatar not showing

resolver

We have a blog called Insights and when creating blogs an author is selected but their profile image/avatar does not appear on the page. I have reviewed the script in the template for publishing the authors avatar and it appears intact.

 

The line of code which prints out the avatar in the html doesn't appear to be doing what it needs to do even when there is an avatar in the autors profile.

 

This is the code:

<div id="hubspot-author_data" class="hubspot-editable" data-hubspot-form-id="author_data" data-hubspot-name="Blog Author" > {% if content.blog_post_author %} {% if content.blog_post_author.avatar %} <div class="hs-author-avatar"> <img src="{{ content.blog_post_author.avatar }}" alt="Picture of {{ content.blog_post_author.display_name }}" width="35px" style="border-radius:100%; width:35px; border-width:0px; border:0px"> </div> {% endif %} {{ content.blog_post_author.display_name }} | Date: {{ content.publish_date_localized }} {% endif %} </div>

 

I don't know why the HTML is not being printed into the page.

 

Please help

Thank you

0 Avaliação positiva
1 Solução aceita
Aakar
Solução
Conselheiro(a) de destaque

Blog Avatar not showing

resolver

Hi @GillBraysh 

 

I could be wrong but I see two If statements together.

 

{% if content.blog_post_author %}

{% if content.blog_post_author.avatar %}

 

Maybe this is messing up with your avatar. Try removing {% if content.blog_post_author %} this statement and see whether it helps. You might want to close your IF statement first before starting another.

 

Thanks.

Aakar Anil
Marketing Technologist
aakar.me | @aakarpost | in/aakarpost

Exibir solução no post original

0 Avaliação positiva
1 Resposta 1
Aakar
Solução
Conselheiro(a) de destaque

Blog Avatar not showing

resolver

Hi @GillBraysh 

 

I could be wrong but I see two If statements together.

 

{% if content.blog_post_author %}

{% if content.blog_post_author.avatar %}

 

Maybe this is messing up with your avatar. Try removing {% if content.blog_post_author %} this statement and see whether it helps. You might want to close your IF statement first before starting another.

 

Thanks.

Aakar Anil
Marketing Technologist
aakar.me | @aakarpost | in/aakarpost
0 Avaliação positiva