Support » Fixing WordPress » Exclude Child Pages With 'wp_nav_menu' – Primary Menu

  • matius


    Have an issue where I don’t want child pages showing in my primary menu. When I include them they appear like a dropdown menu when I roll over the particular parent page…

    If I don’t include them though, they won’t appear in the Flexi widget pulldown menu that I need them only to appear in.

    Is there a way with wp_nav_menu to exclude child pages?

Viewing 5 replies - 1 through 5 (of 5 total)
  • matius


    In my theme … TwentyTen

    Updating the following in the CSS seems to do the trick:

    #access ul li:hover > ul {
       /* display: block; */
       display: none;

    matius, I’m trying to do the same thing in the same theme. Where can I find this bit of code to update?

    mikelite, you can find this code in wp-content/themes/twentyten/style.css on line 430.

    It is better to make a child theme and edit the CSS there, however.

    matius, did you find a solution?

    You may be able to write another CSS rule specifically targeting the Flexi widget pulldown menu that re-applies the display:block.

    brilliant, thanks a lot authentictech

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude Child Pages With 'wp_nav_menu' – Primary Menu’ is closed to new replies.