Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
237 views
in Q2A Core by
Hello,

I need to call from my template function like: "if this post is from category X, show template Y" . For example, I want to show on my site icon "Music" or "Games" on thumbnail for post, if some post is from MAIN category Music or Games. Only MAIN category is important, because I have MANY subcategories. I can add something like this to code:

if(($q_item['raw']['categoryid']) == '121') { something };

...but it only works with SUBcategories. I need function like this but only for MAIN categories.

Anyone could help me, please? :)
Peter
Q2A version: 1.7.4

Please log in or register to answer this question.

...