How to Hide Categories in Magento 2
Hidden categories in Magento 2 are the categories that are not displayed in the frontend of the store in the navigation menu or in any other place on the store.
A Magento 2 store admin may want to create a hidden category for the administration purpose or hide it from the customers for time being.
Or, he might want to link to a category that is not included in the navigation menu.
Also, if a category is created for future products which are now under development, so there is no point in displaying it to the customers now. So, the admin can hide empty categories in Magento 2 store to avoid any confusion for the customers as well as easily manage the products under development category-wise.
If you are a Magento 2 store admin having any of the above scenarios, follow these steps to hide categories in Magento 2.
Steps to hide categories in Magento 2:
- Login to admin panel
- Navigate to Catalog > Categories
- Select the category that you want to hide from the category tree on the left side.
- Disable “Enable Category” to deactivate it.
- Disable “Include in Menu” to hide the category from the navigation menu.
- Under Display Settings, disable “Anchor”
- Save the configuration.
The frontend will not show the “training” category as it is now a hidden category as shown here:
Moreover, you can add subcategories to the hidden categories and active them as shown below:
- Login to admin panel
- Navigate to Catalog > Categories
- Select the sub-category of a hidden category that you want to activate.
- Enable Category
- Under Display Settings, enable “Anchor“
- Save the configuration.
Here, the subcategories from the hidden parent category won’t be shown in the navigation menu but on the other parts of the Magento 2 store.
That’s it.
Any doubts about the above steps? If so, please mention them in the Comments section below.
I’d be happy to help.
Also, do not forget to share the tutorial with the Magento community via social media.
Thank you.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
How to Add Watermark to Product Images in Magento 2
How To Create Virtual Products in Magento 2
Next