Forum
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.
Found the answer to this here: https://forum.grabaperch.com/forum/11-09-2014-filter-multiple-categories?page=1