Forum
Filtering By Category Set in Blog Archive
Hi
Is it possible to filter by category set using perch_blog_custom
on the blog archive template?
So instead of listing all the full category paths, which will be added to over time, you can filter by the set to display all categories within that set?
Something like...
perch_blog_custom([
'category' => array('departments/*', 'offices/*'),
'template' => $template,
'count' => $posts_per_page,
'sort' => $sort_by,
'sort-order' => $sort_order,
]);
Many thanks
Glen
I've managed to get it to work like so. Not sure if it's the best way, but it works!
Yes, that looks fine.