Blog, Website & Page Publishing

GillBraysh
Participant

Blog Avatar not showing

SOLVE

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 Upvotes
1 Accepted solution
Aakar
Solution
Key Advisor

Blog Avatar not showing

SOLVE

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

View solution in original post

0 Upvotes
1 Reply 1
Aakar
Solution
Key Advisor

Blog Avatar not showing

SOLVE

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 Upvotes