Hi moeinich,
Hope you are doing well.
Thank you so much for sharing the details with us. Actually, the category name and subcategory name should be different to each other. If you use the same subcategory that has the same name, then it will show that it is under the first main category. So, in order to avoid this issue, please use the category and subcategory with the different names. All category and subcategory name should be different. According to your scenario, the subcategory names under the “Category 1” and “Category 2” should be different. Otherwise, it will show that it is from the first main category “Category 1”.
If you don’t want to show the other categories and docs except the active category on the category sidebar, then please use the following custom CSS on your website:
#betterdocs-sidebar .betterdocs-single-category-wrapper.category-grid.active.default.show {
display: block;
}
#betterdocs-sidebar .betterdocs-single-category-wrapper.category-grid.default {
display: none;
}
You can simply add custom CSS by navigating to your WordPress Dashboard -> Appearance -> Customize.
After you are on the Customize page, search for the “Additional CSS” option. You can then go ahead and insert the CSS Code. Please check this screencast to learn more – https://d.pr/v/QrrfTw
Hope you understand. Please let me know if you have further queries or need assistance.
Thank you.