Let's say I have entries tagged with multiples categories, for example category_id="1"
and category_id="2"
.
Then when I do:
{exp:channel:entries channel="news" category="1" orderby="date" status="open"}
{categories}
<span>{category_id}</span>
<h5><a href="{site_url}news/category/{category_url_title}/{url_title}">{title}</a></h5>
{/categories}
{/exp:channel:entries}
I get the following result:
1
My entry title
2
My entry title
1
Another entry
2
Another entry
Why is that? How can I avoid this? If I ask specifically for category_id="1"
in my {exp:channel:entries}
parameter, I should get only entries belonging to said category.
Thanks in advance for your help.
FYI: EE version is v2.7.2