1

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?

3

No, 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!

1
  • Ok Cary, using select query it should work. Jan 30 '14 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.