Forum

Thread tagged as: Question, Problem, Configuration

Categories + perch_content_custom

I have a repeating region on one page that uses categories, and I would like to pull items with a specific category from this region to another page.

I can't seem to get this working, not sure why:

Set: people Category: john smith

perch_content_custom('Companies', [
  'page'=>'/companies/index.php',
  'template'=>'/aside-featured.html',
  'category'=>'/people/john smith'
]);

Thanks

Brad Cerasani

Brad Cerasani 0 points

  • 7 years ago

Does your category slug need to be john-smith (with a hyphen)? i.e

'category'=>'/people/john-smith'
Drew McLellan

Drew McLellan 2638 points
Perch Support

try:

'category'=>'people/john-smith'

Thanks guys - wasn't missing a hyphen in my real code, just wasn't copying the set slug correctly. <perch:showall /> helped diagnose. Long day ;)