This code adds a custom menu to a WordPress website. It uses the WordPress function register_nav_menu to register a custom menu with the name ‘custom-menu’ and a label of ‘Custom Menu’. The add_action function is used to trigger the register_custom_menu function when the WordPress ‘init’ action is called.
Was this code snippet helpful?
YesNo