Blog, Website & Page Publishing

GillBraysh
参加者

Blog Avatar not showing

解決

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 いいね!
1件の承認済みベストアンサー
Aakar
解決策
キーアドバイザー

Blog Avatar not showing

解決

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 いいね!
1件の返信
Aakar
解決策
キーアドバイザー

Blog Avatar not showing

解決

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 いいね!