WordPress.org

Support

Support » How-To and Troubleshooting » wp_nav_menu not displaying subcategories?

wp_nav_menu not displaying subcategories?

  • Maybe I am not fully understand how wp_nav_menu works. I thought if I add a parent category which has a number of subcategories I will be getting this:

    • Parent menu
      • Sub menu 1
      • Sub menu 2

    instead of

    • Parent menu
    • Sub menu 1
    • Sub menu 2

    I tried adding “depth” parameter:
    <?php wp_nav_menu( array( ‘container_id’ => ‘quick-access’, ‘theme_location’ => ‘primary’, ‘depth’ => 2, ) ); ?>

    Still I am not seeing a hierarchy. ?!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_nav_menu not displaying subcategories?’ is closed to new replies.
Skip to toolbar