WordPress.org

Ready to get started?Download WordPress

Forums

Custom Menus - Only displaying child page links when parent link clicked (8 posts)

  1. LucyRyder
    Member
    Posted 2 years ago #

    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!

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Are the child pages also added to the custom menu in Appearance->Themes?

  3. LucyRyder
    Member
    Posted 2 years ago #

    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?

  4. esmi
    Forum Moderator
    Posted 2 years ago #

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

  5. LucyRyder
    Member
    Posted 2 years ago #

    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

  6. LucyRyder
    Member
    Posted 2 years ago #

    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!

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    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.

  8. LucyRyder
    Member
    Posted 2 years ago #

    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)

Topic Closed

This topic has been closed to new replies.

About this Topic