Support » Themes and Templates » Custom Menus – Only displaying child page links when parent link clicked

  • Hello,

    I am using the Twenty Eleven Theme with a child theme, and have created a Custom menu for my main navigation. I have child pages for some of the parents, and only want these links to display when their parent is clicked. I want the child page links to be listed under the parent menu links.
    In my main menu which is set to my Primary menu, I have the child links set to be nested under their parent, but all the links are showing in the navigation – whereas i only want the parent ones to dhow, and when i click on a link, it’s children’s links are displayed underneath.

    Any ideas on how I can achieve this?

    Many thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Are the child pages also added to the custom menu in Appearance->Themes?

    Hi Esmi, They are added to the menu in Appearance > menus, and indented to the right of their parent link so they are nested as children – is this what you mean?

    Have you edited the theme in any way? Can you post a link to your site?

    Hi again Esmi,

    My site is just local at the moment – yes I have a twentyeleven-child theme and have overwritten quite a few files – do you think i have turned something off which usually allows me to achieve what i want to easily?

    If I need to wait until my site is on a live server next week to ask you again let me know!

    thanks
    Lucy

    Your code in this post works perfectly,

    http://wordpress.org/support/topic/only-display-sub-pages-when-top-level-page-is-clicked?replies=11

    but i cannot order the pages myself – but this i what i want to achieve with custom pages if possible!

    Yes. I think there may be an issue in either your child’s stylesheet or in the set up for wp_nav_menu. We may be able to decide which it is when we see the site.

    Great stuff i’ll get back to you next week then when its on a live server – thanks very much for all your help and speedy responses :0)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom Menus – Only displaying child page links when parent link clicked’ is closed to new replies.