Loop if post has both categories
-
hellos everybody, great plugin, i can do anything with my website without knowing php, thanks Eliot!.
so, im trying to loop for posts that have 2 categories, in the reference file i found that i could use compare=”and” and i tried this code:[loop category=”Presentaciones, br events” orderby=”date” order=”DESC”]
[content]
[/loop]but this way it displays all posts from both categories, i also tried tihs code:
[loop category=”Presentaciones” orderby=”date” order=”DESC”]
[if category=”br events”]
[content]
[/if]
[/loop]but this one displays no posts at all…
i need this code to display posts only if they have both categories: “Presentaciones” AND “br events”, is there any way i can achieve this? what am i doing wrong?
thanks!
The topic ‘Loop if post has both categories’ is closed to new replies.