In this article:
Menus are a very important part of website navigation, especially when using WordPress. Sometimes you may want to create a submenu to one or more menu items. In some of these cases, the top link acts more as a category name and will not need to link to a page of its own. This article demonstrates how to create a top level menu item, and how to disable that top menu item link in WordPress. This feature is available in all of our WordPress themes found in our WordPress website builder product.
Disabling the Link Attribute to a Top Level Menu Item
- Log into your WordPress Dashboard.
- Click on the Customize link from the left hand menu.
- Click on the Menus option.
- Select the menu you want to work with.
- Click on the Add Items button.
- Click on the Custom Link option. Name it (Link Text) and give it a URL.
- Next, click on Add to Menu.
- Now, drag the items you want in the sub menu under the new custom link item. Sub-menu items are indented to easily identify the menu structure.
- Click on the Custom Link edit arrow.
- Remove the URL from the URL field.
- Click the Save & Publish button.
Now, when visiting your WordPress website, the Top Menu menu item will reveal the sub-menu and not function as a link by itself. This is helpful if you want to minimize the number of pages you want to manage, and focus on your sales or information pages more.
Disable a Menu in WordPress
The easiest way to disable a menu in WordPress is to remove the menu from it’s assigned location in your WordPress dashboard.
Navigate to Appearance > Menus > Manage Locations to see all menu locations in your active theme. Below we have 3 menus – Main Menu, Social Icons, and Sticky Main Menu. If you do not want a menu to appear in a location, change the dropdown to read Select a Menu. In the example below, the Sticky Main Menu location will not display a menu. When you’re finished, click the blue Save Changes button.
If you’d prefer, advanced users can unregister a menu location from the functions.php file. Below is an example to unregister a menu named primary, taken from the WordPress official documentation.
unregister_nav_menu( 'primary' );
We recommend using the Code Snippets plugin to make changes to functions.php. Any changes made in the core theme files could be overwritten when the theme updates.
Test WordPress Updates Safely
If you get nervous making php changes we have a safe environment for you! You can create a free WordPress installation with BoldGrid’s Cloud WordPress service. This demo website is in the cloud, not tied to your live site. This means any changes you make in the cloud version of your website will NOT show on your live site.
Congratulations! You now know how to create a top link menu item, and disable it so that it only works as a dropdown for your menu. This particular article explains how to make this change using our WordPress Website builder, BoldGrid Inspirations and our classic WordPress Themes. If you would like to have a few more options for your WordPress website, feel free to check out our new SuperTheme Crio – A WordPress theme for business.
200+ Design Templates + 1 Kick-ass SuperTheme
6 WordPress Plugins + 2 Essential Services
Everything you need to build and manage WordPress websites in one Central place.