You can configure your shop to show categories before products by navigating to Appearance > Customize > WooCommerce > Product Catalog > Shop page display. By default, FiboFilters will hide the categories when a filter is applied, showing only the products on the shop page.
Customizing category selectors
Categories are typically located within an HTML element that has the product-category CSS class. If your categories are inside a different HTML element, FiboFilters won’t be able to hide them. To resolve this, you can specify custom classes with the following code:
add_filter( 'fibofilters/config/product_categories_selectors', function () {
return [
'.product-cat', // Custom class
'.product-category' // Default class
];
} );
ⓘLearn how to add this snippet to your WordPress.
Disabling category hiding
If you want categories to remain visible after a filter is applied, add this code:
add_filter( 'fibofilters/config/hide_categories_when_filters_active', '__return_false' );
ⓘLearn how to add this snippet to your WordPress.
With this code, categories will stay visible before the products, even when filters are active.