Troubleshooting Common Twenty Eleven Theme Menu and Navigation Issues
Content
Many users of the classic Twenty Eleven theme encounter challenges when customizing their site's navigation. Based on common community reports, this guide addresses the most frequent menu-related problems and their solutions.
Common Issues and Solutions
1. Changing the Default Navigation from Pages to Categories
Problem: The default navigation displays pages, but you want to show a list of categories instead.
Solution: The most effective method is to use WordPress's built-in Custom Menu feature. Navigate to Appearance > Menus in your WordPress dashboard. Create a new custom menu and add your desired categories to it. Then, assign this new menu as your Primary Navigation, often found in the 'Theme Locations' box. This approach avoids the need to edit theme files directly and provides the most flexibility.
2. Menu Items Not Saving Hierarchy or Changing to 'Custom' Type
Problem: When creating sub-menus, items won't save their indented position or revert from a 'page' type to a 'custom' link after saving.
Solution: This is often a browser or plugin conflict. First, ensure you have clicked Save Menu after making changes. If the problem persists, try clearing your browser cache, using a different browser, or temporarily disabling all plugins to test for a conflict. Consistently saving your menu structure is key to making it stick.
3. Menu Items Appearing as Unclickable Text
Problem: Newly added menu items appear as plain text and are not clickable links.
Solution: This typically happens when the menu item's URL is missing or invalid. In your Appearance > Menus screen, edit the problematic menu item. Ensure the 'URL' field is filled out correctly with a valid web address (e.g., https://yoursite.com/your-page). If the item was added automatically as a page, try removing it and manually re-adding it to the menu.
4. Active Menu Highlight Not Working Correctly on Child Pages
Problem: The parent menu item does not stay highlighted (e.g., a different color) when a visitor is viewing a child or grandchild page.
Solution: The Twenty Eleven theme should handle this highlighting by default. If it's not working, it is likely being overridden by custom CSS. Use a browser inspection tool like Chrome DevTools or Firefox Developer Tools to check which CSS rules are applying the highlight. In your child theme's style.css file, you may need to add a more specific CSS rule, such as .current-page-ancestor or .current-menu-ancestor, to style the active parent item.
5. Menu Wrapping onto Two Lines
Problem: The navigation menu has enough space but wraps onto a second line anyway.
Solution: This is almost always a CSS issue. The total width of your menu items (including padding and margin) exceeds the width of their container. To fix this, you will need to adjust the CSS. Using a browser inspector is crucial here. Common fixes include:
- Reducing the
padding-leftandpadding-righton the#access liselector. - Reducing the
marginbetween menu items. - Slightly reducing the font size for the menu.
- Increasing the width of the containing
#accessdiv if your theme layout allows for it.
General Best Practices
- Use a Child Theme: Before making any code changes, create and activate a child theme. This ensures your customizations are not overwritten when the parent theme is updated.
- Leverage Custom Menus: The WordPress Custom Menus feature (Appearance > Menus) is powerful. Use it to create complex navigations with categories, custom links, and pages instead of editing theme files.
- Use Browser Inspection Tools: Tools like Chrome DevTools are invaluable for identifying the CSS classes and IDs controlling your menu's appearance. This helps you write targeted CSS for your child theme.
By following these troubleshooting steps, you can resolve the majority of navigation issues in the Twenty Eleven theme and create a menu that works exactly how you need it to.
Related Support Threads Support
-
[Theme: Twenty Eleven] I want to show the cates in navigation instead of pages, how to change?https://wordpress.org/support/topic/theme-twenty-eleven-i-want-to-show-the-cates-in-navigation-instead-of-pages-how-to-change/
-
[Theme: Twenty Eleven] Changing the menu item name for the "home" pagehttps://wordpress.org/support/topic/theme-twenty-eleven-changing-the-menu-item-name-for-the-home-page/
-
Active menu item for parent when parent, child, grandchild pages are displayedhttps://wordpress.org/support/topic/active-menu-item-for-parent-when-parent-child-grandchild-pages-are-displayed/
-
How to exclude items from top navigation drop down menuhttps://wordpress.org/support/topic/how-to-exclude-items-from-top-navigation-drop-down-menu/
-
Getting Menu Nested with Imagehttps://wordpress.org/support/topic/getting-menu-nested-with-image/
-
[Theme: Twenty Eleven] Image in navigation twenty eleven themehttps://wordpress.org/support/topic/theme-twenty-eleven-image-in-navigation-twenty-eleven-theme/
-
Change Nav in Showcase Sliderhttps://wordpress.org/support/topic/change-nav-in-showcase-slider/
-
My new menu items are unclickable, as if they were texthttps://wordpress.org/support/topic/my-new-menu-items-are-unclickable-as-if-they-were-text/
-
How to get a different hover image on top of link?https://wordpress.org/support/topic/how-to-get-a-different-hover-image-on-top-of-link/
-
hoover color doesn;t cover whole menu itemhttps://wordpress.org/support/topic/hoover-color-doesnt-cover-whole-menu-item/
-
Looking for class/ID nameshttps://wordpress.org/support/topic/looking-for-classid-names/
-
How to code a row of three image-links?https://wordpress.org/support/topic/how-to-code-a-row-of-three-image-links-1/
-
[Theme: Twenty Eleven] Menu issue with twenty eleven child themehttps://wordpress.org/support/topic/theme-twenty-eleven-menu-issue-with-twenty-eleven-child-theme/
-
Last item in navigation menu won't stay put–is there a limit?https://wordpress.org/support/topic/last-item-in-navigation-menu-wont-stay-put-is-there-a-limit/
-
[Theme: Twenty Eleven] Custom menu hilighthttps://wordpress.org/support/topic/theme-twenty-eleven-custom-menu-hilight/
-
Menu not in one linehttps://wordpress.org/support/topic/menu-not-in-one-line/
-
Customise menu not loading correctly in appearancehttps://wordpress.org/support/topic/customise-menu-not-loading-correctly-in-appearance/
-
CSS for listshttps://wordpress.org/support/topic/css-for-lists-2/
-
customizing menuhttps://wordpress.org/support/topic/customizing-menu/
-
[Twenty Eleven] nav bar bug?https://wordpress.org/support/topic/twenty-eleven-nav-bar-bug/
-
How do I change the icon on my sitehttps://wordpress.org/support/topic/how-do-i-change-the-icon-on-my-site/
-
My menu hierarchy isn't working inhttps://wordpress.org/support/topic/my-menu-hierarchy-isnt-working-in/
-
Sub Menuhttps://wordpress.org/support/topic/sub-menu-8/
-
[Theme: Twenty Eleven] Eliminating the body then installing linked images…https://wordpress.org/support/topic/theme-twenty-eleven-eliminating-the-body-then-installing-linked-images/
-
Multiple menu items get highlightedhttps://wordpress.org/support/topic/multiple-menu-items-get-highlighted/