Skip to content

How to add custom category attribute in the layered navigation filters in Magento 2

I’m new to Magento 2 and trying to figure out the way to implement the following scenario:

We have categories with custom attribute which is multi-select. These attributes need to be category-specific.

Eg: Category : Supplier 1, Custom attribute : Supplier Type --> Values: Local, Offline etc.

Now we need to add this filter in the layered navigation filter – side tab on the product listing page with filter values like Local, Offline, etc.

Is there is way to show this category-custom attributes in sidebar filters like product attributes?

Or

To Create some custom attributes in the product page with the value of the same option as of category custom attribute and update values when category-custom attribute is updated using some queue job. Is this the right way to do it in Magento2

  • how we can trigger jobs when category custom attributes are updated?

Any suggestions?