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
We use cookies to allow login, checkout, and analyze site traffic. By continuing to use this website, you consent to the use of cookies in accordance with our cookie policy.
Frank Neuhaus
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
OnPoint Plugins
Hi Frank,
Can you give me an example of a parent page with no children that has a menu displayed?
Frank Neuhaus
Hi,
Sure: https://www.viacarta.eu/horoskope/esshoroskop/
Thanks!
OnPoint Plugins
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!
Frank Neuhaus
Awesome 🙂
Thank you so much.
Frank
Frank Neuhaus
Hi, sorry to say but I had to make some changes on the webpage and it seems that IDs did change as well.
https://www.viacarta.eu/horoskope/50-plus-horoskop/
Would it be possible for you to check the page and update the code above?
Thanks in advance.
Frank
OnPoint Plugins
Hi Frank,
Looks like there is no way to determine the id from the markup anymore.
You can give this one a try, but it’s purely a best guess:
If that doesn’t work, one last thing to try is adding the following filter which will allow us to see the widget args within the markup. This will determine if there is something we can use.
Frank Neuhaus
Hi and thanks again for your support.
Unfortunately the code did not bring the result I was hoping for.
Anyhow, I did also add the other function. Are you able to inspect again now?
Frank
OnPoint Plugins
Hi Frank,
I think that gave us what we need. Give this a try:
Frank Neuhaus
It is working. 🙂
Thank you again for your outstanding support.
Frank