WordPress.org

Support

Support » How-To and Troubleshooting » Setting Max Number of Top Level links in Link Menu

Setting Max Number of Top Level links in Link Menu

  • I need to limit the number of links a user can apply to the top level of the navigation. I want them to go up to only five but there is no built in way to limit this. You can limit the depth but not the amount. The sub nav can be any length.

    This is what I have:

    <?php
                $nav_menu = wp_nav_menu( array(
                    'menu'			=> 'Top Nav',
                    'depth'			=> 3,
                    'menu_class'    => 'navigation dropdown',
                    'container'		=> ''
                )); ?>

    Can anyone help?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Setting Max Number of Top Level links in Link Menu’ is closed to new replies.
Skip to toolbar