• Resolved graftedin

    (@graftedin)


    This is not showing only child categories when a parent is selected. A previous post suggested I need to activate the hierarchy but that has no effect. I guess what “Only show children of the current category” means is your stuck with all the parent categories all the time. That’s a bit miss leading.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @graftedin,

    Sorry for the confusion there. What that means is the only time you’ll see child categories is when the parent is being viewed. All the top-level categories will be present, but children will only be shown when viewing their specific parent. Otherwise, child categories won’t be displayed.

    Disabling that shows the children regardless of which parent is currently being viewed.

    If you’re looking for something different, you may need to go with a plugin that has a different widget for this. I don’t have one to suggest, but you might search for widgets that work with custom taxonomies.

    Best,

    Thread Starter graftedin

    (@graftedin)

    What I was hoping for was a list of child categories with no parents and only if we were in a child or parent. If I go to walmart.com and look for shoe it doesn’t show me pants. It shows me sub categories of shoes followed by other ways to narrow my search. If I want to look for pants I go back to the main nav or follow the breadcrumbs back up a level.

    Hi @graftedin,

    I can definitely see how that would be helpful. The built-in widget doesn’t have an option for that, but you might be able to make it hide the parent categories that aren’t the current one with some CSS.

    In your dashboard, go to Appearance > Customize and click on the Additional CSS section. Add this to the box there:

    
    .widget_product_categories .cat-item.current-cat.cat-parent, 
    .widget_product_categories .cat-item.current-cat.cat-parent ul.children li {
        display: block;
    }
    .widget_product_categories .cat-item {
        display: none;
    }
    

    When I tried that on my test site, it only showed the current category and its children/parent.

    Otherwise, you’ll end up needing a third-party widget that has a way to hide other categories built-in.

    Take care,

    Howdy @graftedin,

    We have not heard from you in a while so I will close this thread. If you continue to have issues please open a new thread!

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘product categories widget’ is closed to new replies.