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

Only display child pages of current page

Resolved

Requested: 5 years and 2 months ago

Hello, I would like to display specific pages in the left sidebar of my page which is working. in the right sidebar I would like to display only the sub pages of the current page. Is this possible?

Thanks, Frank

Plugin: Advanced Sidebar Menu

  1. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 2 months ago

    Hi Frank,

    If you add the following filter to your active theme’s function.php file the menu will display the current page’s children only.

    If you wish to also include the current page you may use the “Display highest level parent page” option. Leaving this option unchecked will not display the current page.

    Have a great day!

  2. Avatar for Frank NeuhausFrank Neuhaus

    5 years and 2 months ago

    Hi, thank you very much, this is great.

    But I would like to keep the “normal” menu in the left sidebar and show only the submenu items in right sidebar.

    Is this possible somehow?

    Thanks again, Frank

  3. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 2 months ago

    Hi Frank,

    You may target a specific sidebar or widget id by changing the filter to the following:

    • If you wish to target a specific sidebar and you know the id you may change SIDEBAR_ID_GOES_HERE to the id of the sidebar.
      • The will need to match the id your theme uses to register the sidebar.
    • If you wish to target a specific widget and you may change WIDGET_ID_GOES_HERE to the id of the widget.
      • You may retrieve this from the markup of the widget (assuming your theme adds an id).
      • Otherwise, if you wish to send a link to the page through the “Private Information” I can take a look and retrieve the widget id for you.

     

  4. Avatar for Frank NeuhausFrank Neuhaus

    5 years and 1 month ago

    Hi, thanks again.

    I have sended credentials so if you could take a look it would be great.

    Frank

  5. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 1 month ago

    Hi Frank,

    It’s a bit tricky to determine the ids because this is an Elementor widget, but give the following a try:

    Let me know if it doesn’t work and I’ll spin up an environment with Elementor loaded to see if there is anything unique we can use to target the widget.

  6. Avatar for Frank NeuhausFrank Neuhaus

    5 years and 1 month ago

    Hi, this worked partially.

    When I open a page including a parent item it is working fine and show only the child items within the left sidebar.

    When I open a subpage the child items are gone.

    You might want to look here

    https://www.viacarta.eu/horoskope/50-plus-horoskop/

    and here

    https://www.viacarta.eu/horoskope/50-plus-horoskop/50-plus-horoskop-widder/

    Thanks, Frank

  7. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 1 month ago

    Hi Frank,

    Do the sub pages have children?

    The filter as written will only show child pages of the current page. If you are on a page which does not have children, there is nothing to display.

  8. Avatar for Frank NeuhausFrank Neuhaus

    5 years and 1 month ago

    No, there are no children on subpages so I was hoping the code will reference to the parent item of the current subpage.

  9. Avatar for OnPoint PluginsOnPoint Plugins

    5 years and 1 month ago

    Hi Frank,

    A little creative engineering and the filter can be made to display the current page’s level when the current page has no children:

  10. Avatar for Frank NeuhausFrank Neuhaus

    5 years and 1 month ago

    You are great!!! It is working. 🙂

    Thank you so much for this outstanding support.

    Frank

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