Forum

Thread tagged as: Question, Blog

Filtering Categories By Excluding

Hi

I was just wondering if there's a way of filtering categories but instead of stating what categories to include, stating which categories to exclude?

I would like to filter categories using perch_blog_custom to show all blog categories apart from one?

Something like...

'category' !=> 'news',

I hope that made sense?

Glen

Glen Piggott

Glen Piggott 0 points

  • 4 years ago
Duncan Revell

Duncan Revell 78 points
Registered Developer

Hi Glen,

there's some info here: https://docs.grabaperch.com/perch/categories/filtering/

'category' => '!news',

Duncan Revell said:

'category' => '!news',

Thanks Duncan Revell, perfect!