How to Control and Customize the Twenty Fourteen Theme's Top Navigation Menu
Content
The Twenty Fourteen theme's primary navigation menu is a central feature, but its default behavior often leads to a common point of confusion for site owners. Many users find that every page they create automatically appears in this top bar, and they struggle with how to manage its visibility, order, and content. This guide explains why this happens and provides the most effective solutions for taking control of your menu.
Why Do All My Pages Appear in the Top Menu?
If you haven't created a custom menu, the Twenty Fourteen theme will automatically generate one by listing your site's published pages in the order of their publication. This is a WordPress fallback function called wp_page_menu() that activates when no custom menu is assigned to the 'primary' theme location. While convenient for getting started, it offers little control over which pages are shown or how they are ordered.
Solution 1: Create a Custom Menu (Recommended)
The best way to gain complete control over your top navigation is to create a custom menu. This is the standard method recommended by WordPress and allows for easy drag-and-drop management.
- From your WordPress admin dashboard, navigate to Appearance > Menus.
- If you haven't created a menu before, click on the "create a new menu" link. Give your menu a name (e.g., "Primary Menu") and click "Create Menu".
- On the left, you'll see panels for adding Pages, Posts, Custom Links, and Categories. Check the boxes next to the items you want to add to your menu and click the "Add to Menu" button.
- In the menu structure area on the right, simply drag and drop items to arrange them in your desired order. You can also create dropdown menus by dragging an item slightly to the right underneath another item.
- Most importantly, you must assign a Display Location. In the "Menu Settings" box at the bottom, check the box for "Primary Menu".
- Click "Save Menu".
Once a custom menu is assigned to the Primary location, the theme will stop automatically listing all your pages. Only the items you explicitly add to the custom menu will appear.
Solution 2: Hiding Specific Pages with CSS (Temporary Fix)
If you need to quickly hide just one or two pages from the auto-generated list without creating a full custom menu, you can use CSS. This method requires finding the unique ID of the page you want to hide.
- View the page you want to hide from the menu on your live site.
- View the page's source code (often by right-clicking and selecting "View Page Source").
- Look near the top of the
<body>tag for a class likepage-id-XXX, where "XXX" is the unique ID number of that page. - Using a plugin for adding custom CSS, add the following rule, replacing
XXXwith the actual page ID you found:
#primary-menu .menu-item-page-id-XXX { display: none; }
Note: This is generally considered a less ideal workaround than creating a custom menu, as it only hides the page visually and does not remove it from the underlying code.
Solution 3: Removing the Menu Entirely
For users who do not want a top menu at all, completely removing it requires editing theme files. It is strongly advised to use a child theme before making any changes to theme files to prevent your modifications from being lost during theme updates.
To remove the menu bar and the space it occupies, you would typically need to remove the code that generates it from the header.php file and potentially add CSS to adjust the layout afterward. However, the complexity of this can vary, and creating a custom menu with no items is often a simpler way to achieve a similar clean look without editing code.
Conclusion
The automatic population of the top menu is a default behavior of the Twenty Fourteen theme, not a bug. The most powerful and recommended solution is to use the built-in Appearance > Menus functionality to create a custom menu. This gives you full control over the links, their order, and their hierarchy, resolving the most common issues users have with the primary navigation bar.
Related Support Threads Support
-
Exclude some pages from horizontal header menuhttps://wordpress.org/support/topic/exclude-some-pages-from-horizontal-header-menu/
-
Navigation menu helphttps://wordpress.org/support/topic/navigation-menu-help-1/
-
More than two menus?https://wordpress.org/support/topic/more-than-two-menus/
-
Social links in menu bar in twenty fourteenhttps://wordpress.org/support/topic/social-links-in-menu-bar-in-twenty-fourteen/
-
Unwanted top menu linkshttps://wordpress.org/support/topic/unwanted-top-menu-links/
-
Addling Menushttps://wordpress.org/support/topic/addling-menus/
-
How to remove my pages from the top bar menu?https://wordpress.org/support/topic/how-to-remove-my-pages-from-the-top-bar-menu/
-
How many images can I put at the top?https://wordpress.org/support/topic/how-many-images-can-i-put-at-the-top/
-
show external contenthttps://wordpress.org/support/topic/show-external-content/
-
Adding Menus in 2014https://wordpress.org/support/topic/adding-menus-in-2014/
-
simple ads managerhttps://wordpress.org/support/topic/simple-ads-manager-2/
-
add new page to twenty fourteen themehttps://wordpress.org/support/topic/add-new-page-to-twenty-fourteen-theme/
-
Headers, pictures etc. go over the Primary Menu Barhttps://wordpress.org/support/topic/headers-pictures-etc-go-over-the-primary-menu-bar/
-
Search bar and Login on navigation menuhttps://wordpress.org/support/topic/search-bar-and-login-on-navigation-menu/
-
How to re-order pages?https://wordpress.org/support/topic/how-to-re-order-pages/
-
HomePage Menuhttps://wordpress.org/support/topic/homepage-menu-2/
-
Create Top Menu Linkshttps://wordpress.org/support/topic/create-top-menu-links/
-
How to remove the Primary Navigation Menu?https://wordpress.org/support/topic/how-to-remove-the-primary-navigation-menu/
-
How to Add Banner Adshttps://wordpress.org/support/topic/how-to-add-banner-ads/
-
How to create a hidden 'Thank You Page'https://wordpress.org/support/topic/how-to-create-a-hidden-thank-you-page/
-
moving page listing from top of screenhttps://wordpress.org/support/topic/moving-page-listing-from-top-of-screen/
-
Home Pagehttps://wordpress.org/support/topic/home-page-197/
-
Top menu – how does it get created?https://wordpress.org/support/topic/top-menu-how-does-it-get-created/
-
Place menu above headerhttps://wordpress.org/support/topic/place-menu-above-header/
-
Adding Homepage in theme 2014https://wordpress.org/support/topic/adding-homepage-in-theme-2014/
-
Add "down" arrows to manu barhttps://wordpress.org/support/topic/please-please-help-add-down-arrows-to-manu-bar/
-
HomePage Menuhttps://wordpress.org/support/topic/homepage-menu-1/
-
How to add Login / Logout and Register options in the top menuhttps://wordpress.org/support/topic/how-to-add-login-logout-and-register-options-in-the-top-menu/
-
Hos to add content at the tophttps://wordpress.org/support/topic/hos-to-add-content-at-the-top/