3

I use an FSE theme and as you might know the Navigation block is pretty limited. I want to implement a custom mega-menu-ish navigation for a big website.
Is there any way to enable the Appearance->Menus in the admin dashboard while FSE theme is enabled, so that I could use a shortcode to implement this?

2 Answers 2

4

Is there any way to enable the Appearance->Menus in the admin dashboard while FSE theme is enabled

I noticed that in some FSE themes the classic Menus admin page shows up under Appearance:

enter image description here

when they include a register_nav_menus( ... ) call within the after_setup_theme hook to define the relevant classic menu locations.

See for example the Raft theme's setup:

https://themes.trac.wordpress.org/browser/raft/1.0.3/inc/Core.php#L87

It's also possible to select classic menus within the Navigation block:

enter image description here

We note that the "Manage menus" link in the Navigation block is

/wp-admin/edit.php?post_type=wp_navigation

and it is not pointing the classic Menus admin page:

/wp-admin/nav-menus.php
4
  • 2
    Wow that worked. Just place register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'raft' ) ) ); in functions.php and it appeared in the sidebar. Commented Oct 11, 2022 at 10:54
  • ... and it should be possible to call classic menu within the Navigation block
    – birgire
    Commented Oct 11, 2022 at 10:56
  • I updated the answer with another screenshot @AkshayKNair
    – birgire
    Commented Oct 11, 2022 at 11:01
  • I used the code but I cannot find how to call the classic menu in the fse editor. In the navigation block it doesn't appear the option as you posted in the screenshot. could you help me finding a solution? Commented Mar 4 at 8:52
0

I followed the instructions, and i managed to create a menu in the classic menu editor. However the "Select Menu" button in the Gutenberg editor is not showing up. Any ideas how to get that working? Thanks.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.