CMS Development

jmarcello
Participant

Query The Blog Author Name on Blog Author Pages

When viewing a blog authors page (listing posts by that author)...

 

How do I pull in that author's name, or other info so I can identify that the page being view is a list posts by that author.

 

For example...

 

Read All Post's By "Author's Name Here".

or

 

Real All By Posts By John Marcello

Any help is greatly appreciated.

0 Upvotes
3 Replies 3
jlamb2
Contributor

Query The Blog Author Name on Blog Author Pages

You can do this with HubL:

 

Read all posts by 

{{ blog_author.display_name }}
jmarcello
Participant

Query The Blog Author Name on Blog Author Pages

So hubspot knows the author simply by virtue of the page it is currently on?

0 Upvotes
jlamb2
Contributor

Query The Blog Author Name on Blog Author Pages

Yes, so one example of a picture of the author, their name, and a link to all their posts might be adding this to the post template:

 

{% if content.blog_post_author.avatar %} <a href="{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}"><div> <img src="{{ content.blog_post_author.avatar }}" alt="author"> </div> {% endif %} <p>Written by: <a href="{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}">{{ content.blog_post_author.display_name }}</a></p>
{% if content.blog_post_author.bio %}<p>{{content.blog_post_author.bio}}</p>{% endif %}

You might want to look through this page to get a reference of all the tokens available:

 

https://designers.hubspot.com/docs/hubl/blog-content-markup