Can I hide the blog author from a HubSpot blog post?

Last updated: February 12, 2016

In order to hide the author information on a HubSpot blog post (for all authors) you may remove the author tags from the blog template's html (via commenting-out the blog author code).

  • Navigate to Content > Blog > Manage Blog Template
  • In your blog's template, locate the Blog Content module > click each of the buttons for Edit Post Template and Edit Listing Template > locate the following tag in the HTML of each:
<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>
{% if content.blog_post_author %}
<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 %}
{% if content.blog_post_author.has_social_profiles %}
<div class="hs-author-social-section">
<span class="hs-author-social-label">Find me on:</span>
<div class="hs-author-social-links">
{% if content.blog_post_author.facebook %}
<a href="{{ content.blog_post_author.facebook }}" target="_blank" class="hs-author-social-link hs-social-facebook">Facebook </a>
{% endif %}
{% if content.blog_post_author.linkedin %}
<a href="{{ content.blog_post_author.linkedin }}" target="_blank" class="hs-author-social-link hs-social-linkedin">LinkedIn</a>
{% endif %}
{% if content.blog_post_author.twitter %}
<a href="{{ content.blog_post_author.twitter }}" target="_blank" class="hs-author-social-link hs-social-twitter">Twitter </a>
{% endif %}
{% if content.blog_post_author.google_plus %}
<a href="{{ content.blog_post_author.google_plus }}?rel=author" target="_blank" class="hs-author-social-link hs-social-google-plus">Google+</a>
{% endif %}
{% endif %}
{% endif %}
  • Add a hubL comment to the code just before the opening <p> tag like this {# and add a closing comment tag just after the closing </p> tag like this #}
  • Once the comments are in place you can publish the changes in your template.

Alternatively, add CSS

An alternative method to accomplish the same goal is to add a CSS declaration to your blog's associated styles that sets the author id element to display:none. This may be an option if you'd prefer to use CSS to hide author information and you haven't customized your blog content's html. Try adding the following css declaration into your associated blog style sheet:
#hubspot-author_data {

Was this article helpful?