How to create a non-clickable top-level menu item in WordPress
In WordPress, the issue as described above is very easily avoided by using a custom link as the parent menu item (also called the top-level page or menu item) in a custom menu. The parent menu item is then assigned a URL of # (hash) or is left empty to deactivate the menu-item as a link.
Why doesn’t my WordPress sub-menu show on iPhone and iPad?
A client of mine recently had an issue where their WordPress website sub-menus weren’t displaying when the top-level menu item was clicked on an Apple iPhone or iPad. The WordPress parent menu-items had been created as custom links with the URL field left empty so the parent item wasn’t hyperlinked. On Android, Windows and Blackberry devices the sub-menu showed when the parent item was clicked but it just wasn’t working on iPhone or iPad (with Safari or Chrome browsers).
The solution is that the URL field of a parent menu-item can’t be left empty as it won’t work on iOS. A # (hash) should be used instead of no URL at all. For whatever reason, iOS doesn’t like the URL field of a menu item being empty.
Thanks for the WordPress solution! What a difference a # (hash or pound sign) makes. Most forums say create the parent menu item with a #, create sub menus, then delete the # from the parent. Worked on my MacBook and pc . Even worked on iPhone, just not elegantly. On iPads, tho, the parent menu was deactivated as intended, but subs did not display at all. Your fix fixed that. (My twenty twelve site is still not beautiful on iPhone but maybe that’s the theme.) Great job, organicwebcomau.wpcomstaging.com.
Many thanks for the tip – yes, the # did the trick 🙂
I’ve been searching all over for this solution. Like Shakya said above, the # did the trick. At least I still have half my hair left after pulling the first half out trying to get this figured out. Thank you so much! 🙂
Thank you just had a client ask me about this today, had no clue why this was happening…
where do you find the parent menu?
Thanks for help !
Hello Guys.
How can i add hash in menu link?