Contact

    Exclude a blog topic from a list of blog posts on HubSpot

    Difficulty Level: Advanced. This post assumes a strong understanding of HubSpot tools and technical knowledge. Insutructions are given as guidelines and may require additional customisation.

    There are a few scenarios where you may wish to hide a specific blog topic from appearing in your posts, such as hiding blogs tagged as "featured" from your blog listings.

    You can do this by using a condition that checks the topic name, like this:

    {% raw %}{% for content in contents %}
      {% for topic in content.topic_list %}
        {% if topic.name != 'The Topic To Be Excluded' %}
          {# Add the markup for the rest of your posts here #}
        {% endif %}
      {% endfor %}
    {% endfor %}

    Written by: Stephanie O'Gay Garcia Orginally Published: September 29, 2019 Last Updated: September 29, 2019

    Thank you! I appreciate the feedback 😊

    Sorry to hear that! 🙁

    I'd appreciate if you could take a moment to let me know how I can improve this article.

    New call-to-action
    hand-drawn-monitor-and-mouse

    Looking for a HubSpot website developer?

    Let me help you with website themes, templates, page setup and custom modules. 

    Get in touch

    Stephanie O'Gay Garcia

    Hi! 👋 I'm a freelance HubSpot Website Developer based in Toronto (Canada). Give me a shout if you have questions about this post or there's anything I can help you with.