CMS-Blog

Why is my blog sidebar rendering at the bottom of my blog?

Last updated: January 9, 2017

Applies to:

Marketing Hub
marketing-basic-pro-enterprise
Basic, Professional, Enterprise

The sidebar rendering at the bottom of a blog is generally a symptom of having an unclosed <div> tag in your blog template markup. The most common cause results from if you have an opening or closing <div> within an if statement in your Blog Content module markup. To resolve:

  • Navigate in HubSpot to your blog template and ensure that all of your <div> are evenly wrapped inside or outside of if statements.
    • Incorrect example, where the sidebar would show below the blog, if the blog author is not defined:

      <div>
      {% if content.blog_post_author %}
      </div>
      {% endif %}
    • Correct example, where the div would only render if the author was defined: 

      {% if content.blog_post_author %}
      <div>
      </div>
      {% endif %}
  • If you are still seeing an issue, make sure that there are the same number of opening and closing <div> tags in the markup.
  • Finally, if you are using a truncate filter to limit the number of characters that render in a listing post content, you should instead use a truncatehtml filter to ensure that all tags are closed out.

Was this article helpful?

If you still need help you can get answers from the , or to contact support.

Free Content Marketing Training Power your business with remarkable content. Start the course Free Inbound Marketing Training Learn inbound marketing techniques that range from creating content, using  social promotion, converting and nurturing leads, and all the way to marketing  to your customers. Start the course