Hi there,
I am using a post widget for the sidebar and my site is set up with a post hierarchy (No categories).
When I get to a post in the hierarchy that has no children I see in the sidebar the post itself and its direct parent and its top-level parent.
I know this is the case as I have “Display highest level parent” set which I need for the other levels of the sidebar.
What I want to know is, if the post has no children can you restrict the sidebar at this point to only show itself and one parent above it in the sidebar?
Dion Bairle
Enclosed some access details.
Dion Bairle
Just looking at this more there are some old posts from a few years ago that suggest you can filter to show the current items direct parent only.
That option does not seem to be there anymore though, so maybe another way is to show the current items, direct parent, only and itself.
OnPoint Plugins
Hi Dion,
If you add the following filter to your active theme’s functions.php file, the menu will automatically:
Have a great day!
Dion Bairle
Thanks this works!
Is it possible to adapt this to show only one parent above in all cases?
OnPoint Plugins
Hi Dion,
This will affect all levels except the highest level (which does not have a parent).
Have a great night!