OnPoint Plugins

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

Only display child pages of current page

Resolved

Requested: 9 months and 2 days 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. OnPoint Plugins

    9 months and 2 days 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. Frank Neuhaus

    9 months and 2 days 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. OnPoint Plugins

    9 months and 2 days 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. Frank Neuhaus

    9 months and 1 day ago

    Hi, thanks again.

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

    Frank

  5. OnPoint Plugins

    9 months and 1 day 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. Frank Neuhaus

    9 months and 1 day 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. OnPoint Plugins

    9 months and 1 day 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. Frank Neuhaus

    9 months and 1 day 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. OnPoint Plugins

    9 months and 1 day 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. Frank Neuhaus

    9 months and 1 day ago

    You are great!!! It is working. 🙂

    Thank you so much for this outstanding support.

    Frank

  11. Frank Neuhaus

    9 months and 15 hours ago

    Hi, There is only one thing I would like to ask.

    If a parent page got no child pages the entire menu is displayed.

    Can this be changed somehow that in this case none of any menu item is shown in right sidebar?

    Thanks, Frank

  12. OnPoint Plugins

    9 months and 9 hours ago

    Hi Frank,

    Can you give me an example of a parent page with no children that has a menu displayed?

  13. Frank Neuhaus

    9 months and 8 hours ago

    Hi,

    Sure: https://www.viacarta.eu/horoskope/esshoroskop/

    Thanks!

  14. OnPoint Plugins

    9 months and 7 hours ago

    Hi Frank,

    Give this version a try which checks if the current item is a first level child and if has no children does not use it’s parent as the the top level menu item:

    Have a great day!

  15. Frank Neuhaus

    8 months and 4 weeks ago

    Awesome 🙂

    Thank you so much.

    Frank

Newer Responses »

New Response Cancel reply

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

© 2021 OnPoint Plugins · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact