OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Category Widget Hide Parents

Resolved

Requested: 7 months and 4 weeks ago

Hi, 

This is a great plugin but there is one thing that is not working correctly or maybe we have not configed it correctly. 

So I have a category that is several levels deep. It goes like 

Vehicle

-Audi

— A4

— 2000-2005

— 2005-2010

— 201-2015

 

It shows the categoires on the sidebar nicely and I have the option to hide the parent perm enabled. So it hides Vehicle when lets say Audi is selected. The problem is that while it hides the parent category Vehicle, it doesn’t hide the siblings category of Audi. So it shows other makes such as Acura, BMW etc. I want to hide other makes when a user vists the /vehicle/audi category page. Only show Audi and its children, not the siblings of Audi. 

You can see our demo site here: 

https://youcaniccom.bigscoots-staging.com/vehicle/bmw/

username/pass: dev/dev

Is there something we can do it to configure to have this behavior? If not, is it possible to add this functionalty to hide sibling categories? 

 

Thank you very much

Plugin: Advanced Sidebar Menu

  1. OnPoint Plugins

    7 months and 4 weeks ago

    Hi Rushit,

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

    • Note: The filter will not work if “Always display child categories” is checked.
      • Not currently checked on your site, so the filter will work.

    Have a great weekend!

     

  2. Rushit Hila

    7 months and 3 weeks ago

    Hello,

    Thanks for the help. Can this functionality be implemented in the settings? And also is it possible for it to work if “Always display child categories” is checked?

  3. OnPoint Plugins

    7 months and 3 weeks ago

    Hi Rushit,

    This version of the filters will add a “Hide siblings of first level children” checkbox to the widget options. If the option is checked, the siblings will be hidden, if widget will retain the default functionality.

     

    At this time there is no great way to add this functionality if “Always display child categories” is checked because the menu is rendered using WordPress core logic which doesn’t have the necessary conditionals available.

    Have a great day!

  4. Rushit Hila

    7 months and 3 weeks ago

    Thansk for the feedback. Is that code supposed to go in themes functions.php?

     

  5. OnPoint Plugins

    7 months and 3 weeks ago

    Yes. Within the functions.php of your active theme.

New Response Cancel reply

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

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

  • Plugins
  • Blog
  • Contact