How can I get back the content of a sub-menu

Did you delete it from the WordPress Dashboard Menu screen or did you delete it from theme/plugin code? If from the Dashboard Menu screen, that means that you’ve deleted it from the database and to retrieve it you’d have to restore from a back-up if you have one. That’s really your only option other than … Read more

Hide default menu items in wordpress apearance > menus

You will able to remove nav menu meta-box links from screen option but if you want to remove by custom code, please try below code, simply copy and paste this into your functions.php file: function custom_remove_menu_link_types() { global $wp_meta_boxes; foreach ($wp_meta_boxes[‘nav-menus’][‘side’] as $nav_menus) { foreach ($nav_menus as $nav_id => $nav_menu) { // remove all menu’s … Read more

WordPress menu walker – help to add custom class for each submenu

You’re right, it’s the object-oriented parts that are throwing you off. The nav menu call should be: wp_nav_menu(array( ‘theme_location’ => ‘menu-top’, ‘container’ => ‘ul’, ‘menu_class’ => ‘header_nav_ul’, ‘menu_id’ => ‘header_nav_id’, ‘depth’ => 0, ‘walker’ => new my_walker_nav_menu_start_el, )); no parentheses () after the name of the walker. The walker itself needs to extend Core’s Walker_Nav_Menu, … Read more

Change hover to onclick on menu

Just found how to do it. The solution is very simple, it all was just about playing around the “slideToggle” function on the same object I was working on in the main question. Only one problem won’t disappear, if I click once, and then mouseout, the submenu will be open-able via hover. You’re forced to … Read more