In WordPress under Appearance > Menus there is the visual menu builder where you can "indent" items to make them sub items of another menu item. I would like to disable the ability to make items sub items by either restricting the ability to drag items inwards or disable any other way that creates sub menu items.

I don't have any code I've tried yet, I've been searching for this for hours and, maybe my search terms are off, but the only articles I can find are to disable a parent item from being a link.

Any help would be greatly appricated! Thanks!

  • It wouldn't be ideal, but you could create a custom nav walker that outputs all menu items at the same level. In this way your users would be able to have indented items in the admin UI, but they would always appear as top-level on the front end. That might be easier than trying to hijack both the customizer and the menu admin interface. – WebElaine Mar 19 at 19:40
  • Ah! Yeah I agree it might not be ideal, becasuse ideally I'd like the user to see they can't make the sub menu, but this is a smart idea I didn't think of which might just be what I need to do! Thanks! – Lia Mar 19 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.