Need to insert the sub menu of the current page into the current page's sidebar.

Is this possible?

What I'm interested in developing would be a menu that looks like this:

menuItem1 => subitem1, subitem2

menuItem2 => subitem3, subitem4

Navigate to Item1 page where the sidebarA contains the menu links sub1, sub2.

Navigate to Item2 page, sidebarA contains menu links sub3, sub4.

Any suggestions on how to do this either programmatically or with a widget?

Thank you.

  • I found this answer on Stackoverflow. Commented Jun 27, 2019 at 20:46
  • If you want to do it via a plugin/widget, this one works well and doesn't require you to create menus, it just displays the parent/child relationships you've established in the Page Attributes / page hierarchy: wordpress.org/plugins/advanced-sidebar-menu
    – Michelle
    Commented Jun 27, 2019 at 21:07

1 Answer 1


If you want this to be dynamic, based on the page and the associated menu, then you may need to write some code, because as of this moment, I do not know of a theme or a plugin that would perform that function. However you can simulate it, through the creation of independent menus for the individual pages and by using a widget, place the code on a page by page basis.

I tend to like this plugin for such a purpose:


or a sidebar plugin controller, which also does the job:


Sadly they have not updated this plugin for a few cycles, but I have do have clients that are still using it successfully.

Either way, the layout of the menu is changeable in the menu area. Just create a new menu item for each of the unique menus you want.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.