Menu Sections

Since v1.4. Currently in Beta

Overview

Bellows Menu Section functionality allows you to display just a section or slice of a multi-level static menu (created in Appearance > Menus), as defined by a root menu item. The root can be defined statically (by menu item ID) or dynamically (based on the current page), and you have the option to include the root item within the menu section display.

Bellows Section Shortcode

bellows_section

This shortcode allows you to display a section of a static menu

config_id
The Bellows Configuration ID to use to generate the menu.

Default: main
menu
Required. The numeric ID of the menu to display
root
Required. The numeric ID of the menu item to use as the root, or a dynamic value:

current – the menu item matching the current page

current_parent – the parent of the current menu item

current_root – the top level ancestor of the current menu item
include_root
Whether or not to include the root within the menu structure.
Default: false

How to display only a section of a menu: Examples

For these examples, let’s assume we have the following menu structure for a Continent > Country > Location menu. The ID of this menu is 27 and we’ll be working with the Main configuration for simplicity.

Here are some examples of how we can splice some sections that include “Colorado”:

Example 1: Statically defined section

[bellows_section menu="27" root="52" include_root="true"]

The menu item ID of “United States” is 52, so we are setting the root to the static value of 52.

This shortcode will display the same contents no matter what page we’re viewing, because the root is statically defined.

Example 2: Dynamic section, parent of the current menu item

[bellows_section menu="27" root="current_parent" include_root="true"]

Because the root here is dynamic, the displayed section of the menu will change depending on the page we’re viewing.

Example 3: Dynamic section, top level from current menu item

[bellows_section menu="27" root="current_root" include_root="true" ]

Example 4: Dynamic section, excluding top level item, from current menu item

[bellows_section menu="27" root="current_root" include_root="false" ]

On this page