Forum

Thread tagged as: Question

Perch custom to grab subcategories, not parent

Using perch custom is it possible to grab all the subcategories and not the parent?

Example categories set up with the Cat Path of:

/colours/ (parent)

/colours/green (sub cat)

/colours/blue (sub cat)

Code I'm using:


<?php perch_blog_categories(array( 'filter' => 'catPath', 'match' => 'contains', 'value' => 'colours', )); ?>

Obviously the above is returning the parent 'colours' is there a way to exclude that so I'm only displaying the category levels within 'colours'

Sarah Evans

Sarah Evans 0 points

  • 5 years ago