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

Direct Parent and Siblings Only

Resolved

Requested: 5 years and 7 months ago

I am trying to use the sidebar on a page that is 4 levels deep. I only want to display the direct parent and the siblings in a dropdown list, but I cannot figure out how to do this. It seems it wants to go up 2 parent levels and I cannot limit it to just one. This is my structure:root/community/neighborhood/buildings/condo1 (condo2, condo3, etc.)
I only want to have a dropdown navigation with Buildings as the parent and condo1, condo2, condo3, etc. listed below the parent. Like this:
Buildings>Condo1>Condo2>Condo3
Please advise. Thank you.

Plugin: Advanced Sidebar Menu

  1. Avatar for Richard BarnhartRichard Barnhart

    5 years and 7 months ago

    I’m sorry, I’m not that good with code which is why I bought this plugin. So, I add this code to my functions.php file, then what? Does this give me more options with the plugin so I can do what I want?

  2. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 7 months ago

    Hi Richard,

    The code automatically changes the menu output to do what you want. The majority of the widget options will still be supported. All page widgets will simply be limited to the 2 mentioned levels.

    Have a great night!

    Mat Lipe

  3. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 7 months ago

    Hi Richard,

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

    This will only display the current page, it’s direct parent, and it’s siblings. Unless you are on a top level page, then it will display the current page and it’s first level children.

    Have a great day!

    Mat Lipe

  4. Avatar for Richard BarnhartRichard Barnhart

    5 years and 7 months ago

    New problem. I have other menus that display the current page as the parent and then the children. You code broke those menus, so only the parent is displayed.

  5. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 7 months ago

    Hi Richard,

    If you can provide me either a sidebar id or a widget id that you want to target specifically with the filters I can adjust them to only affect the one you would like. For this to work, the widget or sidebar must be unique enough to exclude your other ones.

    If you prefer, you may send me a link through the Private Information and I will pull the id from your page’s markup.

    Mat Lipe

  6. Avatar for Richard BarnhartRichard Barnhart

    5 years and 7 months ago

    OK, thanks, and just to be clear, I need 2 types of menus:

    1. Menu with current page on top with 1 level of children underneath.

    2. Menu with direct parent page on top and siblings underneath.

    Here are two IDs to target:

    condo_sidebar_child

    condo_sidebar_siblings

    Thanks.

  7. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 7 months ago

    Good Morning,

    Here is an updated filter which targets the two mentioned sidebars separately:

     

  8. Avatar for Richard BarnhartRichard Barnhart

    5 years and 7 months ago

    This new code is still breaking my other menus and it isn’t working on the target IDs.

  9. Avatar for Richard BarnhartRichard Barnhart

    5 years and 7 months ago

    I want to make sure we are on the same page about what I’m trying to accomplish, so here is a more detailed description of exactly what I need. This is a url from my site of the deepest page in the hierarchy with description of each menu I need.

    community: display children (works with your default plugin)

    pompano-beach: display current page and children (works with your default plugin)

    cypress-isles: display parent page and siblings (works with your default plugin)

    The problem starts with going further down the hierarchy. In this url I need two things to happen:

    condos: display current page and children

    sabbia-beach: display parent page and siblings

  10. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 7 months ago

    Hi Richard,

    Changing the menu structure that much from level to level is currently not possible with available filters and options.

    The only way I know to approach this is to have a separate widget that is used on only the Condos and children of Condos pages. This could be done one of the following ways:

    1. Using the “Advanced Sidebar Navigation” widget and a custom menu.
    2. A separate “Advanced Sidebar Pages” widget and the original filter adjusted to target only that widget and always use the Condos page as the parent.

    If you decide to go with option 2, once you have the widget on the pages, I can get the widget id and the Condos page id from the page markup.

    Have a great weekend!

    Mat Lipe

Newer Responses »

New Response Cancel reply

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

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

  • Plugins
  • Blog
  • Contact