Is there a way to use or style a sidebar navigation menu widget as breadcrumbs?
I’d like to be able to just build my navigation and set the hierarchy with “Appearance > Menus” rather than relying on our SEO plugin (SEO Press Pro) and having to manually set parent/child relationships on every single page.
Any ideas would be most appreciated!
OnPoint Plugins
Hi Les,
Certainly, you may style your widget to match the site’s breadcrumbs using the following custom CSS.
Have a great day!
Les Lee
Thank you so much for the styles, that is very helpful indeed and gets me part of the way there.
What settings would I need to use on the widget itself to show:
“Home » Parent Page » Current Page Only”
OnPoint Plugins
Hi Les,
If you add the following filters to your active theme’s functions.php file, the menu will only display:
Have a great night!
Les Lee
That code works brilliantly! Thank you.
One last related, request: Since the site we’re working on goes pretty deep, is there a way to have 3rd, 4th, 5th, etc. levels show in the “breadcrumb” string?
e.g. “Home » Parent Page » Parent Page » Parent Page (etc.) » Current Page”
Thank you so much for the excellent help!
Les Lee
Actually looks like when I go to the a second level item (e.g. About) I’m getting an error.
https://edot.mysites.io/about/
https://prnt.sc/1mhgyo9
OnPoint Plugins
Hi Les,
I have adjusted the filters to support an unlimited number of parents above the current page.
I also wanted to mention to be sure to have “Display the current item’s section only” checked if you don’t want the widget to show up on pages which are not included in the menu.
Have a great night!
Les Lee
This is excellent and most appreciated!
Thank you so much for the action and filter code. And thanks for the tip on the setting as well.
Have a great rest of your week!