Become a HubSpot power user — join us for HubSpot Training Day 2017.

COS-Blog

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

Last updated: January 9, 2017

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A
{% raw %}

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.
{% endraw %}

Was this article helpful?