The number of menu items allowed in a menu is limited by the amount of memory allocated to PHP by your hosting provider. In real terms this limits menu items to around 70-90 items. But what if you have more? Here are some things to consider.
Do You Need That Many WordPress Menu Items?
First of all you really need to consider your menu strategy. Why are you including so many items? If there a more efficient way to organize the links and information on your site? Look at how Amazon (which probably has more than 90 items in its “Shop by Department” menu) organizes the millions of items. For example under “Books and Audible” instead of having all of the possible categories of books, there are just links to “Books, Kindle Books, Children’s Books, Textbooks, and Magazines”.
On the Books page further navigation is provided by categories and search. There are no extensive drop-down menus.
Perhaps this kind of tree-related structure would work better for your users. Instead of linking to every single subitem from a main navigation, link to major items and have menus on those pages which further drill down.
For example a clothing site might have links to Men, Women, Children, Accessories. On the Women’s page a menu drills down further to dresses, bottoms, lingerie, etc. Google loves this kind of tree branching where one thing leads to another rather than being linked to from every page. It will also improve you page ranking scores.
Page ranking, which is a part of the search engine algorithm, assigns rank by looking at how authoritative the page is and then dividing that score among all of the links on that page. The more links, the more you dilute your page rank. Page rank is only a part of SEO, however, so you have to decide if the risk is worth it.
One solution is to use multiple WordPress menus and have them display next to each other. Each menu would be limited to a max of 70-90 items. Use CSS to make the menus seem like one larger menu. This is actually difficult to implement; I’ve tried. It is also difficult to maintain. Remembering which menu that needs editing is a headache.
It seems counter-intuitive to manually create menus for a CMS system – and it isn’t the best use of the system or your time – but if you absolutely have to use mega-menus with WordPress, the easiest solution is to hand code the menus in HTML.
For a client who insisted on menus that contained over 250 items I created a separate HTML file with just the HTML for the menu in it. I then included that file with php in the sidebar where it needed to show up. This works because she rarely changes menu items and all changes to her site are done by a developer, she doesn’t touch the site.
If considering a mega-menu with WordPress I highly recommend articulating why you need so many link items on every page. Can you do some A/B testing with sample navigation to see what your users prefer? If you must use a large menu and come up against WordPress’ limitations, your best best it just to manually code the menu.