COS-Blog

How can I add the blog author bio at the bottom of a blog post, like how HubSpot's blog posts appear?

Last updated: August 15, 2016

Available For:

Product: HubSpot Marketing
Subscription: Basic, Professional, & Enterprise

Adding this feature to the blog requires changing some HTML within your blog template. If you are not comfortable doing this, we'd recommend working with a designer to make this change.

  • To add the author information to the end of each post, Edit Post Template for that Blog layout.
  • Paste the following code in the HTML editor after {{ content.post_body }}:
<p id="hubspot-author_data" class="hubspot-editable" data-hubspot-form-id="author_data" data-hubspot-name="Blog Author" >
<span class="hs-author-label">Posted by</span>
<a class="author-link" href="{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}">{{ content.blog_post_author.display_name }}</a>
{% if content.blog_post_author.avatar %} <div class="hs-author-avatar"> <img width="35 px" src="{{ content.blog_post_author.avatar }}"> </div> {% endif %}
<p>{{ content.blog_post_author.bio }}</p>
<a href="{{ content.blog_post_author.facebook }}" target="_blank" class="hs-author-social-link hs-social-facebook">Facebook </a>
<a href="{{ content.blog_post_author.linkedin }}" target="_blank" class="hs-author-social-link hs-social-linkedin">LinkedIn</a>
<a href="{{ content.blog_post_author.twitter }}" target="_blank" class="hs-author-social-link hs-social-twitter">Twitter </a>
<a href="{{ content.blog_post_author.google_plus }}?rel=author" target="_blank" class="hs-author-social-link hs-social-google-plus">Google+</a>
{% endif %}
<p> <a href="{{ content.blog_post_author.website }}" target="_blank">Website</a></p>
{% endif %}
  • Save & Update your changes.
  • Make sure this new template is applied for your Blog Posts and not your Blog Listing.