[child_menu]
The shortcode is designed to display a menu of child pages for the current page or a specified page. The menu can be displayed as a widget or as a regular block on the page.
Product
Shortcode Attributes
- id – The ID of the page for which the child menu should be displayed. If not provided, the ID of the current page will be used.
- Options: Any numeric value.
- widget – Whether to wrap the menu in a widget container.
- Default:
on. - Options:
onoroff. Specify one only.
- Default:
- widget_title – The title to display above the menu when
widgetison.- Options: Any text value
Example Usage
[child_menu widget="off"]
[child_menu id="123" widget="off"]
[child_menu widget="on" widget_title="Child Pages"]
Results
| Example 1: Display the child menu for the current page without a widget. Example 2: Display the child menu for a specific page (by ID) as a regular block. Example 3: Display the child menu for the current page as a widget. |
The menu is sorted by menu_order in ascending order.