OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
      • Basic Version
        • Documenation
        • Usage
        • Developer Docs
      • PRO Version
        • Demo
        • Usage
        • Developer Docs
    • Go Live Update Urls
      • Basic Version
        • Documenation
        • Usage
        • Troubleshooting
      • PRO Version
        • Demo
        • Usage
        • URL History
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Hide non-siblins in taxonomie menu

Resolved

Requested: 3 years and 1 month ago

Hi 🙂

I am working on a Woocommerce Categorie submenu.

It goes 3 levels deep, for example:

  • Toys
    • Wooden toys
      • wooden cars
      • wooden horse
    • Race cars
      • blue race cars
      • red race cars
    • Lego
      • Lego city
      • Lego friends

Two thing I am trying to fix:

  1. When a visitor is on a level 2 page (for example “Lego”), I only want it to display its children (“Lego City”, “Lego Friends”), and the other parents (“Wooden Toys”, “Race cars”, “Lego”). Now it is showing also the children of the other parents (“Wooden cars”, etc).
  2. When a visitor is on a level 3 page (for example “Lego city”), I want it to display its sisters and itself (“Lego city”, “Lego Friends”) and also the the level 2 categories above (“Lego”, “Race cars”, “Wooden toys”)

I am a close, but not there yet. Can you help me out :)?

 

Many thanks in advance!

Kind regards,

Remco

Plugin: Advanced Sidebar Menu

  1. Avatar for OnPoint PluginsOnPoint Plugins

    3 years and 1 month ago

    Hi Remco,

    This may be accomplished by adding the following filter to your active theme’s functions.php file.

    The filter makes these changes:

    1. When viewing the top level category, all child and grandchild categories will be displayed.
    2. When viewing a child or grandchild category, only these categories will display:
      1. Parents
      2. Uncles
      3. Children
      4. Siblings

    Have a great day!

  2. Avatar for Remco HarmsenRemco Harmsen

    3 years and 1 month ago

    You, dear sir or madam, are amazing.

    This code does exactly what I wanted.

     

    Many thanks 🙂

  3. Avatar for Remco HarmsenRemco Harmsen

    3 years and 1 month ago

    I am sorry, but when exanding the menu it seems I still have a request left.

    Hope you can also make this happen 🙂

     

    I added another top level category (we already had “Toys”, now I added “Baby”), and I found a problem.

    When a visitor is browsing sub categories of “Toys”, I need to keep those from another grandparents invisible.

    On this example https://www.aanbiedingenbaas.nl/toys/lego/ “Romper” can not show since it is a child of another top category.

    The other way around, when on https://www.aanbiedingenbaas.nl/baby/romper/, I want to hide every other categorie that is not in “Baby”: “Lego”, “Race cars” and “Wooden toys”.

     

    Would love to hear from you!

  4. Avatar for OnPoint PluginsOnPoint Plugins

    3 years and 1 month ago

    Hi Remco,

    If I’m understanding correctly, I think you just need to uncheck the “Display widget on every page” option and menu may display how you like.

    Let me know if that doesn’t do it and I’ll help you customize further.

    Have a great day!

  5. Avatar for Remco HarmsenRemco Harmsen

    3 years and 1 month ago

    Yes, that did the trick.

    Many thanks again 🙂

  6. Avatar for Remco HarmsenRemco Harmsen

    2 years and 10 months ago

    Hello again,

    Still loving the plugin, but when expanding my website I encountered an issue I’d like your help with.

    The custom code your wrote for me in this topic needs a little change.

    It worked perfectly for a product category with a sub and a sub-sub category.

    Right now, I am adding sub-sub-sub categories.

     

    The change I need:

    When on a subcategorie, it is showing sub and sub-sub, I need it to hide the sub-sub-sub.

    I only want these sub-sub-sub to show when a user is on the related sub-sub category.

    For example on: https://www.aanbiedingenbaas.nl/kat/kattenvoer/

    The sub-sub-sub categories “Royal Canin Kitten aanbieding” and “Royal Canin Maine Coon aanbieding” can only show up when a user clicks on their parent “Royal Canin kattenvoer aanbieding”.

    Also, other siblings like “Krabpaal aanbieding” need to hide.

     

    Can you make this happen 🙂 ?

  7. Avatar for OnPoint PluginsOnPoint Plugins

    2 years and 10 months ago

    Hi Remco,

    This may be accomplished by adding the following custom CSS to your site.

    Have a great day!

New Response Cancel reply

You must be logged in to respond. Only PRO members are allowed to respond to support requests.

© 2026 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact