I have created a root category with name colors
in Magento 2. I am trying to access this category by URL http://domain.com/category/colors.html
in front end. But its not working for me. What will the URL of colors category for access product listing of this category on front end?
-
checked not working for me– Pankaj SharmaDec 26, 2018 at 7:13
2 Answers
Please find the steps to create a category and access the category in the URL
- Login to the admin Catalog->Inventory->Categories-> click 'Default category' and click 'Add subcategory' and add the category in the Magento. For example, if you creating a category with name 'colors' means you can access the category in the frontend like this http://domain.com/colors.html.
If you have any doubt what URL to access in the frontend. kindly go to the admin, catalog->Inventory->Categories-> select a particular category and goto search engine optimization ->Url key-> here you can find the exact name.
-
the path you added is no correct.
Catalog->Inventory->Categories->_ _ _
is wrong Dec 26, 2018 at 7:16 -
I think you need to assign new Root Category to your currently active store.
To do this follow below guide:
- Login to back end. Go to Stores-> All Stores
- Than select your store for which you want to display Root Category.
- By default It's using Default Root Category Change it and select your Root Category than save.
For More details : Magento 2.1.4 - Set default root category
Reindex data and Clear Cache.
-
Thanks for your help, now its working for me. I have updated the root category to
colors
as per above guideline. After that I am able to access its child category only. Here is the URL of one child category ofcolors
categoryhttp://domain.com/catalog/category/view/s/brickweb-flats/id/16/
Dec 26, 2018 at 7:58 -
@PankajSharma Glad to know. Could you please also mark answer as accepted so that It will help other users as well. Dec 26, 2018 at 8:23