Sites on the OpenLab

Advanced Sidebar Menu

This plugin allows you to add a widget to your sidebar that generates a menu based on the section of your site you’re viewing. It will show all the subpages related to the page being viewed, and could be helpful for sites with large amounts of content.

Activate plugin

1. Activate Advanced Sidebar Menu under Plugins in the left-hand menu of your Dashboard.

Set page relationships

Pages on your site must have parent and child relationships (top-level and sub-pages)  set, in order for the menu to display properly. You can do this in a few ways: 

1. When you’re adding or editing a page, on the right-hand side under Page Attributes, there’s a dropdown for Parent Page. Choose the parent page. This will be saved after you click Publish or Update. (The screenshot below is for the Block editor. You will find a similar dropdown on the right-hand side of the Classic editor.)

Parent page dropdown in page editor.
PP

2. Or, go to Dashboard > Pages, hover over the page you want to edit, and click Quick Edit. In the Parent dropdown, choose the parent page and click Update.

Parent page dropdown in quick edit.

3. Finally, you can also install the Nested Pages plugin which allows you to drag and drop pages to change the order and define parent child relationships.

Add the widget

1. Go to Dashboard > Appearance > Widgets and add the Advanced Sidebar Pages Menu widget to your sidebar. There are two “Advanced Sidebar” widgets, so be sure you didn’t add the categories menu widget. (You can use this instead if you wish to generate a menu from site categories rather than pages.)

2. In the widget settings, add a title (e.g. Section Contents). There are a number of other options to choose depending on how you want your menu to display. If you want to show all parent and child pages within a section, choose “Display highest level parent page” and “Always display child pages.” In the dropdown for “Maximum level of child pages to display” choose All. When you’re finished, click the Save button.

Widget settings.
Tags: