WordPress.org

Support

Support » How-To and Troubleshooting » Show children from parent when parent is clicked

Show children from parent when parent is clicked

  • Hello all,

    How can I “unfold” my parent to show all the children?
    How can I achieve this with wp_nav_menu();?

    • Parent1
    • Child1 from parent1 only showed when I clicked parent1
    • Child2 from parent1 only showed when I clicked parent1
    • Parent2
    • Child1 from parent2 only showed when I clicked parent2
    • Child2 from parent2 only showed when I clicked parent2

    etc.
    Thanks..

Viewing 1 replies (of 1 total)
  • Hello,

    By default wp_nav_menu should be showing all levels of the menu. Please check your theme whether it does modify the number of layers shown. It should be something like this:

    <?php wp_nav_menu( array('depth' => '1' )); ?>

    If you locate such line, change the depth to 0 (zero) which will render all levels of the navigation.

Viewing 1 replies (of 1 total)
  • The topic ‘Show children from parent when parent is clicked’ is closed to new replies.
Skip to toolbar