Flat menu's getting wrong class
Superb class you have here. Worked wonders for my theme. There's a problem however when I request a menu with a depth of 1. A menu item with sub items still shows the down arrow icon and doesn't link to the page. For instance if I have: /our-company --> /history --> /staff etc. the main menu works great but I have another call to that menu in the footer that's flat. The our-company link should link to the parent page instead of do nothing.
I can of course create a separate menu in the admin but thought I'd point this out.
Interesting... I will definitely take a look ook at this. Just to confirm I have your scenario correct.
You're saying that you are using one menu defined in the WordPress admin and calling via two separate wp_nav_menu definitions one with a depth of 1 and another with a depth of 2?
I think that's exactly what he means, so he has the main menu with the depth of 2 and the footer menu with the depth of 1 to have those items link back to their corresponding pages. The one with the issue is the item that has children in this case the "our-company" item. I'm thinking that he can just add && $args['depth'] != 1 to the if statement on line 84 (line number is from the file in this repo). What do you think?
I am working on an update for this. As much as I am not a fan of top level pages for dropdowns, I absolutely agree that this is how it is expected to work.
After some thought, making these changes it has bigger implications for other sections of the script and that will require a more robust implementation.
This is a very old issue thread and a future branch has the flat menus issue fixed.
Closing this issue.