Exclude topic from listing page and contain 10 posts per page
Currently I am trying to filter out posts from the listing page which contains topic News. At the moment I can filter these posts, but it only deletes the posts from the listing page. So when I have 10 posts per page and 2 posts contains the topic News, only 8 posts wil appear on the page.
So my question is: Is it possible to get posts from the next page? I try to have 10 posts on each page.
Exclude topic from listing page and contain 10 posts per page
how are you filtering?
does this work?
{% for content in contents %}
{% for topic in content.topic_list %}
{% if topic.name != "News" %}
<p> Does not have the news topic</p>
{% endif %}
{% endfor %}
{% endfor %}
substitue the <p> for your listing post content layout
Oct 25, 20182:42 AM - edited Oct 25, 20182:42 AM
Participant
Exclude topic from listing page and contain 10 posts per page
I made a screenshot of the preview page. I made 3 sections. The first section is a summary of how many posts we have, which topics we are using and all the posts with all the topics. In the second section I filtered out the posts which contains the "bad topic". In the last section I added the code I got from @Dennis_.