Forum

Thread tagged as: Question, Problem, Runway

Filter collection by multiple categories

I was wondering how I can make a collection only show items that are BOTH categories?

This is the code I have:

perch_collection('Programs', [
    'template' => 'programs.html',
    'category' => array('city/sydney', 'day/monday-1'),
    'sort' => 'time',
    'sort-order' => 'ASC',
]);

At the moment, this is returning all items that are categories as either 'city/sydney' OR 'day/monday-1' not AND.

Brad Hardinge

Brad Hardinge 0 points

  • 7 years ago