Links

Menu

This block type renders a menu.

Parameters

  • menu - the name of a menu to render;
  • attributes - the menu HTML attributes.

Example

The code below renders the user account menu with an extra my-custom-class CSS class.
echo ( new HivePress\Blocks\Menu(
[
'menu' => 'user_account',
'attributes' => [
'class' => [ 'my-custom-class' ],
],
]
) )->render();
Last modified 10mo ago