Thread tagged as: Question, Blog

Filter post content based on category?

Hi, is there an easy way to show specific content from a post based on category? This is from an array already filtering by the specific category.

                    $opts = array(
                        'category' => array('curator'),

Can we use a perch IF based on catTitle matches or contains? Each post may be in one or more categories.


Stuart Farrell

Stuart Farrell 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you want to branch within the template based on category? Yes you can do that, within the <perch:categories> tags in your template.

Ah cool, works! Never used that before. Thanks.