I have a Pearl WeltPixel theme for my Magento site and I would like to remove the number of products next to the category name in the sidebar. But even putting "no" in display the number of products in layered navigation and then refresh the cache, the numbers are still displayed, I don't know how to do that.

I want to remove the numbers here :

enter image description here

  • Create custom module and override category page and comment code from where count is used Jan 14, 2022 at 11:19
  • @ZahidH Thank you for your answer, how do I make a custom module of the category page? and I already tried to comment count code but nothing change even in flush the cache and reindex
    – PierroTH
    Jan 14, 2022 at 13:00
  • How to create module in magento2: url : (devdocs.magento.com/videos/fundamentals/create-a-new-module) create moduel according to your needs and show me screen shot where you had commented code count... Jan 14, 2022 at 13:46

2 Answers 2


There is a way to disable the count in the Magento admin store configuration.

Navigate to the below path.

Store -> Configuration -> Catalog -> Catalog -> find 'Layered Navigation' then set -> Display Product Count to No

enter image description here

  • I tried but even refreshing the cache and doing a reindex nothing happened. It may be because I have a theme installed on it, right?
    – PierroTH
    Jan 17, 2022 at 14:19
  • Yes, that might be a issue, you need to compare your theme file with the magento core to debug the issue. Jan 17, 2022 at 14:56

You can use CSS way also to hide the count from filters.

add below CSS in your theme store head section by editing Content-> Configuration -> edit your store, In HTML Head section add below CSS in Scripts and Style Sheets.

.catalog-category-view .filter-content .filter-options .filter-options-item .filter-options-content ol li a .count{
    display: none;

Flush your cache and check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.