I wonder if anybody knows this! How to set limit to toplevel menu items in wp nav menu. Example i have this menu in my admin dashboard.
I would like to count ONLY top level items and display for example limited number of them let say 5. So no matter if in admin dashboard you have 100's of top levels it would be displayed only 5 .
The subpages should be displayed as well normaly without any limit. I searched for answer here and on the web and i saw this answer but big problem is that this solution count top and sub pages alltogether and i need to count only top pages. wp nav limit
I would like to see some solution with custom walker class if possible or php in general and not with css and jquery tricks and hacks. THanks