I am using EE 2.7.2. How can we filter channel entries like below:
{exp:channel:entries category="1&2&3&(5|6)"}
Is it possible to use '&' and '|' together?
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communityNo, unforchently you can't use '&' and '|' together. In category parameter you can use or '&' logic or '|' logic.
possible solution:
{exp:query sql="SELECT group_concat(entry_id separator ', ') as result_ids FROM
exp_category_posts WHERE entry_id IN
(SELECT entry_id FROM exp_category_posts WHERE cat_id = 1 AND cat_id = 2 AND cat_id = 3)
AND (cat_id = 5 OR cat_id = 6)" parse="inward"}
{exp:channel:entries entry_id="{result_ids}"}
...
{/exp:channel:entries}
{/exp:query}
Cheers!