Need to Exclude a Particular Topic In a Recent Post Module

New Contributor

I am trying to get it so when the topic is Weekly Feature does not show up in this latest stories HTML module. Here is the working code that I have right now. What can I add to exclude this topic?:


{% set recent_posts = blog_recent_posts('10780960485', 4 ) %}

<div style="padding:0 0 40px 0;" class="latest-news-section">
  <div class="page-center">
    <div class="latest-news-post">
      <div class="latest-news-post-items">
        {% for topic_posts in recent_posts %} 
        <div class="post-item">
          <div class="post-image">
            <div class="blog-post-image" style="background-image: url({{ topic_posts.post_list_summary_featured_image }});"></div>      
          <div class="blog-listing-content">
            {% if topic_posts.topic_list %}
            <p id="hubspot-topic_data">
              {% for topic in topic_posts.topic_list %}
              <a class="topic-link" href="{{ blog_tag_url(, topic.slug) }}">{{ }}</a>{% if not loop.last %} &nbsp;&nbsp;{% endif %}
              {% endfor %}
            {% endif %}
            <div class="post-header">
              <h2><a href="{{topic_posts.absolute_url}}">{{ }}</a></h2>
            <div class="post-body clearfix">
              <!--post summary-->
              {{ topic_posts.post_list_content|safe }}
            <div class="date">
              <a class="author-link" href="/news/author/{{ topic_posts.blog_post_author.slug }}"><img src="" alt="Author"> {{ topic_posts.blog_post_author.display_name }}</a> | <img src="" alt="Publish Date">{{ topic_posts.publish_date_localized }}
            <a class="more-link" href="{{topic_posts.absolute_url}}">Full Story</a>
        {% endfor %}

    <div class="button-section">
      <a href="/news" class="banner-btn">Read More


0 replies

No replies on this post just yet

No one has replied to this post quite yet. Check back soon to see if someone has a solution, or submit your own reply if you know how to help! Karma is real.

Reply to post

Need help replying? Check out our Community Guidelines