• Hi, for my site ( https://www.thenewblackgold.netsons.org/wp/ ) I’m using a child copy of metro-creativex. The problem is I want to hide some categories from the sidebar, but the first block with all the category listing is built in and not a widget. That’s something I found in many other themes I tried and I don’t like it very much.
    How can I modify a theme like this one to exclude some categories or disable that part of the sidebar so I can redo the side menu with a widget?
    Thanks ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can first comment the code that is displaying the categories in the first block. Then use the custom menus widget to display the categories that you want to display.

    The better idea than hiding certain category from the categories widget will be creating a menu from Appearance > Menus > Create Menu and list categories you want to display in that menu. Then go to widgets add a Custom menu widget to sidebar and assign the menu you created to that custom menu

    Thread Starter elichan

    (@elichan)

    Thanks for your help. I tried what you suggested, but then I noticed that it totally hided the sidebar from the mobile version too (that doesn’t get the widgets but only the hardcoded menu), so I found the function that calls the sidebar category list and modified it, adding (‘hide_empty=0&exclude=*****’) to the get_categories, and now it works on both the pc version and the mobile one.
    Thanks ??

    If your question has been answered, we would love if you would mark this topic as resolved in the right hand sidebar. This helps our volunteers find the topics that still need attention and more people will get helped, possibly like you did.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide categories from sidebar (Not widget)’ is closed to new replies.