You can use the [wms_menu] shortcode to create navigation for a subsection of your site in the content area of your page. The menu will list all of the current page’s siblings or child pages (your choice). As you add, remove, or rename related pages, the navigation will automatically update itself. The page you are currently viewing will be highlighted.
You will need to put this shortcode on every page that should have the menu, not just the parent page.
Creating the shortcode
To use the shortcode builder interface, you will need to have the Williams Shortcode Builder plugin activated, and be using the visual editor. This shortcode is only available on pages, and will not appear as on option on posts.
To create the [wms_menu] shortcode:
- Place your cursor in the visual editor where you’d like the menu to appear.
- Click on the “Shortcodes” button, located in the 2nd row of your visual editor’s toolbar (outlined in orange below). If you only see 1 row of tools, click on the kitchen sink (outlined in green below) to reveal the 2nd row.
- Select “Page Menu”, outlined in red below.
Fill out the form in the dialog popup box, shown below. Clicking “OK” will insert the shortcode into the visual editor.
Menu type
Children or siblings – decide if the menu should consist of pages with the same parent as this one (siblings) or pages that are children of this one.
Orientation
Horzontal or vertical – controls the layout of the menu.
Include parent?
For sibling menus, you can choose to include a link to the parent page.
Depth
For child menus, you can limit the number of generations to list (1 would be children only, 2 would be children and grandchildren, etc.). By default, all descendants are included.
Menu style
Plain or fancy – additional styling options for menus (currently only applies to the vertical menus).
Editing the shortcode
In the editor (in both visual and text modes), the shortcode will look something like this:
[wms_menu type="children" orientation="horizontal" incl_parent="yes" style="plain"]
You can edit the shortcode attributes (the values inside the quotes above) directly, or you can delete the shortcode, and create a new one using the shortcode builder tool again.
Megamenu Social