Exclude Filters from post_filter / Get array from post_filter

forms

#1

I was looking for something like:

{% set post_filters = {% post_filter "post_filter" %} %}

{% for filter in post_filters %} 
    {% if filter != 'Read' or filter != 'Listen'  %}
      <li> {{ filter }} </li>
    {% endif %}
{% endfor %}

Currently we have a Sidebar, which displays all Filters, but we want to exclude the Filter 'Read' and 'Listen'.
How would you guys approach this?


#2

Fixed it with:

{% set my_topics = blog_topics(module.select_blog, 6) %}

{% for item in my_topics %}
  {% if item != 'Listen' and item != 'Read' and item != 'Watch' %}
  
    {{ item }}
  
  {% endif %}
{% endfor %}

#3

@Thomas_Bodocean, thank you for sharing your code and glad you got it working!