Forum

Thread tagged as: Question, Problem, Blog

Blog Categories - non-"Blog" set names?

Hi guys,

I'm having some trouble using the perch_blog_category() function with my categories.

The set name is "News", but when I enable Perch Debug, it looks as though the perch_blog_category() function is searching for /blog/cat-Path.

If I switch the set name to "Blog", perch_blog_category() can find the category name based on the slug, but then the category checkboxes aren't listed in the admin because the post path is /news/.

Darren Cusdin

Darren Cusdin 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you're just using normal category sets, then use normal category functions - e.g. perch_category()

You give up a bit of magic if you don't use the Blog functionality, but that's totally fine to do.

Thanks Drew, but how do I use perch_blog_custom() with the category parameter if the category set is titled 'news'?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You'd use the typical:

'category' => 'news/whatever',

Great, thanks Drew.