Classic Menu Block

Description

Use classic menus in gutenberg, using this block. This block renders classic menu data using wp_nav_menu function, improving backwards compatiblity.

Screenshots

  • The navigation block \

Blocks

This plugin provides 1 block.

  • Classic Menu Block A gutenberg block to use classic menus.

Installation

This section describes how to install the plugin and get it working.

  1. Upload the plugin files to the /wp-content/plugins/classic-menu-block directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ā€˜Pluginsā€™ screen in WordPress

Reviews

šŸ‚ 9ļøāƒ£ 4, 2024
Great plugin for what it is ā€“ as a wrapper for the classic menu insert fn wp_nav_menu(), and so to be able to insert a classic menu into a full block theme. Ā BUT Ā ā€¦.Ā Ā  The documentation is totally absent for who this plugin is for, how you use it , whats the prerequisites Ā Ā Ā .. So the plugin provides a block to insert a classic menuĀ  ā€¦So I assume you can insert a classic menu into a website which is using a Block theme. But if I simply start with block theme 2024, install and activate the plugin, then I donā€™t get in the Backend the menu item ā€˜Menusā€™Ā  under AppearanceĀ  ā€¦ so I cannot first setup/create a classic menu ā€¦. But then I realised if youĀ  include the function register_nav_menus() in an action hook in the theme, then I get the MI ā€˜Menusā€™Ā  –Ā  function register_my_menu() {    register_nav_menus();          } add_action( ā€˜after_setup_themeā€™, ā€˜register_my_menuā€™ ); So now I can create a classic menu in the Backend, insert a Classic Menu block  in a page and select a classic menu for that  block insert. So for example, theme 2024 has no such register fn, so I  added it to  a child theme    And then to the stylingĀ Ā  ā€¦.Ā Ā  The pluginĀ  comes with some simple menu stylingĀ  – thatā€™s Ā OK, at least its somethingĀ  ā€¦ ButĀ  if you want to doĀ  your own styling the Spacemonkey article mentionsĀ  a filterĀ  .. but its not clearĀ  what itā€™s for / howĀ  youĀ  use itĀ  ā€¦Ā Ā  But after looking in the code of the pluginĀ  top file Ā classic-menu-block.php, Ā youĀ  can use the filterĀ  to change theĀ  paramsĀ  which Ā in the plugin are then passed to the classic menu insert function Ā wp_nav_menu() .Ā Ā  SoĀ  IĀ  used this to change the class name of the outerĀ  wrapper div of the inserted menu from the default to my ownĀ  ā€¦Ā  as such I could remove the default styling, and style the menu as IĀ  want without the need for !important or mega specificity. Ā Ā Ā  So in conclusion it would be useful to simply add this infoĀ  in the diocumentation Ā Ā Ā ā€¦.Ā  A comment on improving the default styling / adding styling config Ā (there isnā€™t any config at the moment)Ā  ā€¦Ā  I donā€™t know how far this should goĀ  ā€¦ simply because there would be so manyĀ  possibilities Ā toĀ  suite each personā€™s needs so the whole thing becomes totally overweightĀ  ā€¦ Ā Ā I think its best as isĀ  –Ā  the simple currentĀ  styling ā€“ at least Ā it works for theĀ  non-dev, butĀ  with the filterĀ  a developer can doĀ  their own styling.
ā„ļø2ļøāƒ£ 20, 2024
Exactly what I was looking for: a simple menu-block. Nothing more, nothing less.
Read all 2 reviews

Contributors & Developers

“Classic Menu Block” is open source software. The following people have contributed to this plugin.

Contributors

“Classic Menu Block” has been translated into 9 locales. Thank you to the translators for their contributions.

Translate “Classic Menu Block” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.