We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Shop

Filter by brand

Hi, I was hoping someone could help. I am trying to filter products by brand and am using the below code

<?php 

perch_shop_products([
    'filter' => 'shop_brand',
    'match' => 'eq',
    'value' => perch_get('b'),
]);?>

I also want to be able to filter by brand when in a sub-category. So an example url would be products.php?cat=products/clothing/disposable?b=adidas. Could some one help please? Thanks!

Jade Marling

Jade Marling 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I think you'd want:

'filter' => 'brand.slug',