Shortcode

It is possible to display a menu location using the [maxmegamenu] shortcode. This allows easy insertion of menus into your posts and pages.

Step 1: Registering a new menu location

First we’ll need to create a new menu location specifically for use with the shortcode.

Under Mega Menu > Menu Locations, click “Add another menu location”:

Add another menu location on the Mega Menu > Menu Locations page

On the next page, provide a name for the new location. You can also assign an existing menu to the location here, or choose “Skip – I’ll assign a menu later”. Click ‘Add menu location’.

Add Menu Location form with a Location Name and Assign a menu option

After creating the location you’ll be taken back to the main Menu Locations page. Click the new location to open its settings and go to the Display Options tab. You’ll find the shortcode here.

Shortcode on the Display Options tab of the menu location settings

We now have a shortcode that can be pasted into posts and pages to display our new menu location.

Step 2: Display the menu in a post or page

To display the menu simply paste the shortcode from Step 1 into any post or page. In the block editor, use a Shortcode block.

The Max Mega Menu shortcode added to a page using a Shortcode block

End Result

The menu displayed on the front end of the page

Like any other Max Mega Menu enabled menu, you are free to restyle the menu using the Theme Editor and use all of the usual mega menu options to customize the menu.

You can repeat the same steps to create and display multiple Mega Menus on your site.