How to add a submenu toggle button inside all “li” elements that have a submenu?

I managed to solve this: Create the function So I created a new custom walker function in functions.php and copied all the code of the core wp nav walker function (wp-includes/class-walker-nav-menu.php). Check for a menu item that has children I then added this array_search in public function start_el to check if the parent element has … Read more

WordPress sub-menu items suddenly not showing

Welcome, Submenus are there. There is theme css on line 77 of style.css hiding the submenu. To explore, Use something like FireFoxs ‘inspect element’ and untick the display: none. Take up with theme provider as to whether this is a bug (should show on hover), or intentional. Also explore whether some plugin or other css … Read more

next_post_link() on custom menu structure

The function behind the function behind the function… next_post_link(); is a wrapper for adjacent_post_link(); which then calls get_adjacent_post(); where the 3rd argument is $previous and set to true/false to get the previous or next post. This gives you two opportunities: Use the output or the query filter. Output filter This might sound easier, but you’ll … Read more

Walker nav remove submenu ul from a certain depth

At first glance, and without testing anything, the code you’ve got should work but I expect that you have a number of spurious </ul> in your markup. You need to do nearly the same thing for the end_lvl method. function end_lvl(&$output, $depth) { if($depth >= 2) { $output .= ”; } else { $output .= … Read more

Menus like a CMS

3 ideas: Create the empty parent pages and use a redirect plugin to redirect all requests from these pages to the children. Inside the menu options page insert a custom link and link to the desired child page. At the top of your template – lets say page.php – test if children for this page … Read more