Custom blog author HTML

Hi there

I’d like to create custom ‘blog author’ section that looks like this: https://www.zoodigital.com/news/mazin-to-tackle-4k4charity-at-ibc-2018?hs_preview=KipJskmf-6155540930

Currently, the code looks like this:

<div class="full-article-footer">
<div class="article-footer">
<div class="avatar-module">
<img class="avatar" height="100px" src="https://app.hubspot.com/settings/avatar/8eb157f261bdca2aabc7c24e3db0322e">
</div>
<p>Written by
<br>
<a class="author-link" href="https://www.zoodigital.com/news/author/jonny-stringer">Jonny Stringer</a>
<br>
</p>
</div>
</div>

Is there a way to pull this info from the HubL token in the blog settings? Rather than changing the HTML at a page level.

Hi there!

Yes, you should be able to pull in the author information using HubL. The following should work:

<div class="full-article-footer">
<div class="article-footer">
<div class="avatar-module">
<img class="avatar" height="100px" src="{{ content.blog_post_author.avatar }}">
</div>
<p>Written by
<br>
<a class="author-link" href="{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}">{{ content.blog_post_author.display_name }}</a>
<br>
</p>
</div>
</div>

You can find the full documentation here.

I hope that helps!


|300HubSpot Design / Development

Website | Contact

If this helped, please mark it as the solution to your question, thanks!

Perfect, thanks @Stephanie-OG!