WordPress.org

Ready to get started?Download WordPress

Forums

Sub-menus in Twenty Ten Theme. (14 posts)

  1. stevie77n
    Member
    Posted 6 months ago #

    Hi,

    I've taken over a website that has been developed using the Twenty Ten Theme and am trying to display sub-menus in the primary nav. They are added as sub-items in Appearance > Menus but not showing on the front end. From browsing through this forum I believe it is to do with the CSS of the sub-menus needing to be created... is this correct?

    When viewing the primary nav code through my browser (Google Chrome Web Developer Tools Inspeact Element) I can't see the sub-menu's listed below their parent.

    Website address is: http://www.fairwaypsd.com/

    Any help would be appreciated!

    Thanks,

    Steve.

  2. kmessinger
    Volunteer Moderator
    Posted 6 months ago #

    They are added as sub-items

    You are dragging them to the right?

  3. stevie77n
    Member
    Posted 6 months ago #

    Yes, dragging them to the right of the parent.

  4. kmessinger
    Volunteer Moderator
    Posted 6 months ago #

    I see menus under IT solutions - is that the site?

  5. stevie77n
    Member
    Posted 6 months ago #

    The website is:

    http://www.fairwaypsd.com/

    The sub-items for the primary nav have been added to the parent 'Response Handling and Fulfillment'.

    There are four in total that have been added as sub-items (dragged to the right under the parent Response Handling and Fulfillment) which for some reason are not displayed.

    The website is based upon the Twenty ten theme.

    Thanks.

  6. kmessinger
    Volunteer Moderator
    Posted 6 months ago #

    Have you tried:
    - deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). Don't forget the ones in mu-plugins if you have that folder. If you can't get into your admin dashboard, try resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.
    - switching to the default theme to rule out any theme-specific problems.

    Also you need to upgrade to the current version of WordPress.

  7. stevie77n
    Member
    Posted 6 months ago #

    Hi,

    It does appear to be theme specific, the sub-menus appear when switching to a default theme. The current theme is a customised version of Twenty Ten I believe.

    Would you have any ideas what to try next to try to fix the problem?

    Thanks for your help!

  8. stevie77n
    Member
    Posted 6 months ago #

    Ok, still having issues but an update on what I have tried in the hope that someone can help me:

    1. Updated WordPress to latest version - still doesn't work with custom Twenty Ten theme.
    2. Tested with a default theme - sub-menus appear.
    3. Turned off all plugins and tested with custom theme - doesn't work.
    4. Checked the header.php file and found the following code related to the nav menu: wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary', 'depth' => '1' ) );
    5. Changing the depth value to 2 I can see all the sub menu items but all displayed at any one time.
    6. When viewing the page source or inspecting the page elements the sub menus are not listed in the code.

    I believe some additional code needs to be entered in the header to display the sub menus, but am unsure what.

    Would anyone have any ideas what could be causing this?

    Thanks!

  9. esmi
    Forum Moderator
    Posted 6 months ago #

    Do you have the same problems with the original 2010 theme?

  10. stevie77n
    Member
    Posted 6 months ago #

    No, the sub menu items appear OK with the original 2010 theme.

  11. esmi
    Forum Moderator
    Posted 6 months ago #

    Have you tried using Firefox with the Firebug add-on for this kind of CSS troubleshooting? Or using whatever developer tool is available in your web browser? It's probably just a CSS issue.

  12. stevie77n
    Member
    Posted 6 months ago #

    Yes, i'm using Chrome with web developer tools. CSS was my initial thought.

    When viewing the html there are no sub menus listed in the code, just the parent.

    The website is http://www.fairwaypsd.com/ and the menu which should have sub-menu items is 'Response Handling & Fulfilment'.

    Thanks for your help.

  13. esmi
    Forum Moderator
    Posted 6 months ago #

    Remove , 'depth' => '1' from:

    wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary', 'depth' => '1' ) );

  14. stevie77n
    Member
    Posted 6 months ago #

    Ok, I now have the sub menu displaying but it is displaying permanently and affecting the layout of the nav menu.

    http://www.fairwaypsd.com/

    I guess i'll need to create some CSS now to correctly format it all?

    Thanks.

Reply

You must log in to post.

About this Topic