How to Create A Custom Menu In WordPress?

13 minutes read

To create a custom menu in WordPress, follow these steps:

  1. Log in to your WordPress admin panel.
  2. Navigate to Appearance > Menus in the left-hand sidebar.
  3. Click on "create a new menu" or select an existing menu to edit.
  4. Provide a name for your menu and click on the "Create Menu" button.
  5. Once your menu is created, you can start adding items to it.
  6. On the left side of the screen, you will see different options to add menu items like pages, posts, custom links, categories, and more.
  7. Select the type of item you want to add and click on the "Add to Menu" button.
  8. You can also drag and drop the menu items to arrange their order.
  9. To create a submenu, simply drag a menu item below and slightly to the right of another menu item. It will become a submenu item.
  10. After adding all the desired menu items, click on the "Save Menu" button.
  11. Next, you need to assign the menu to a location on your website.
  12. On the same "Menus" page, scroll down to the "Menu Settings" section.
  13. Check the box next to the display location where you want the menu to appear, usually in the header or footer area.
  14. Click on the "Save Changes" button to save your settings.
  15. Visit your website to see the custom menu in action.


By following these steps, you can easily create and customize a personalized menu on your WordPress website, allowing visitors to navigate through your content more efficiently.

Best WordPress Books to Read in 2024

1
Building Web Apps with WordPress: WordPress as an Application Framework

Rating is 5 out of 5

Building Web Apps with WordPress: WordPress as an Application Framework

2
WordPress: The Missing Manual: The Book That Should Have Been in the Box

Rating is 4.9 out of 5

WordPress: The Missing Manual: The Book That Should Have Been in the Box

3
WordPress 5 Complete: Build beautiful and feature-rich websites from scratch, 7th Edition

Rating is 4.8 out of 5

WordPress 5 Complete: Build beautiful and feature-rich websites from scratch, 7th Edition

4
WordPress 5 Cookbook: Actionable solutions to common problems when building websites with WordPress

Rating is 4.7 out of 5

WordPress 5 Cookbook: Actionable solutions to common problems when building websites with WordPress

5
WordPress Plugin Development Cookbook: Explore the complete set of tools to craft powerful plugins that extend the world's most popular CMS, 3rd Edition

Rating is 4.6 out of 5

WordPress Plugin Development Cookbook: Explore the complete set of tools to craft powerful plugins that extend the world's most popular CMS, 3rd Edition

6
WordPress All-in-One For Dummies (For Dummies (Computer/Tech))

Rating is 4.5 out of 5

WordPress All-in-One For Dummies (For Dummies (Computer/Tech))

7
Professional WordPress: Design and Development

Rating is 4.4 out of 5

Professional WordPress: Design and Development

8
WordPress: Pushing the Limits

Rating is 4.3 out of 5

WordPress: Pushing the Limits


How to create a vertical menu in WordPress?

To create a vertical menu in WordPress, you can follow these steps:

  1. Log in to your WordPress dashboard.
  2. Go to Appearance > Menus.
  3. Create a new menu by clicking on the "Create a new menu" link at the top.
  4. Give your menu a name and click on the "Create Menu" button.
  5. On the left side, you will see a list of available pages, posts, categories, and custom links. Select the items you want to add to your menu and click on the "Add to Menu" button.
  6. After adding the items, you can drag and drop them to arrange the order of the menu items. Dragging an item slightly to the right will set it as a sub-item or dropdown menu.
  7. To make the menu vertical, open the "Manage Locations" tab on the top.
  8. In the "Theme locations" section, you will see a drop-down for your menu. Select the menu you created from the drop-down for the "Primary" or "Secondary" location, depending upon your theme.
  9. Save the changes by clicking on the "Save Menu" button.


Depending on your theme, the vertical menu will now appear on your website. However, if your theme does not support a vertical menu by default, you may need to customize your theme or use a plugin to achieve the desired vertical menu layout.


How do I delete a menu in WordPress?

To delete a menu in WordPress, follow these steps:

  1. Login to your WordPress admin dashboard.
  2. Navigate to "Appearance" and click on "Menus." This will open the menu editor.
  3. In the menu editor, you will see various menus available. Select the menu you wish to delete from the drop-down at the top-left corner of the screen.
  4. Once you have selected the menu, click on the "Select" button.
  5. Now, you will see the menu structure and its options. Scroll down to the bottom of the page, there you will find the "Delete Menu" option.
  6. Click on the "Delete Menu" link.


A confirmation message will appear asking if you want to delete the menu. If you are sure, click on the "OK" button, and the menu will be permanently deleted from your WordPress site.


What is a mobile menu in WordPress?

A mobile menu in WordPress is a navigation menu that is specifically designed and optimized for mobile devices. Since the screen size and layout of mobile devices are limited compared to desktop screens, a mobile menu helps to improve user experience by providing a responsive and compact menu option for mobile users. It typically includes a hamburger icon or a dropdown menu that expands to show the navigation links when tapped or clicked. Mobile menus ensure that websites are easily navigable and accessible on mobile devices.

Best WordPress Hosting Providers in 2024

1
DigitalOcean

Rating is 5 out of 5

DigitalOcean

2
AWS

Rating is 4.9 out of 5

AWS

3
Vultr

Rating is 4.8 out of 5

Vultr

4
Cloudways

Rating is 4.7 out of 5

Cloudways


What is the difference between a primary menu and a secondary menu in WordPress?

In WordPress, a primary menu and a secondary menu refer to different navigation menus that can be created and displayed on a website.

  1. Primary Menu: The primary menu, also known as the main menu, is typically the main navigation menu that appears at the top or in the header section of a website. It is the main way for users to navigate through the different pages and sections of the website. The primary menu is usually more prominent and includes important pages such as Home, About, Services, Blog, Contact, etc. It is often displayed horizontally across the top of the website or vertically in a sidebar.
  2. Secondary Menu: The secondary menu, also known as the sub-menu or sidebar menu, is a supplementary navigation menu that typically appears in sidebars or other widget areas of a website. It is used to provide additional links to specific pages or sections of the website that may not be included in the primary menu. The secondary menu is often used for showing categories, tags, archives, or specific page links that are not as essential as the primary menu items but still provide navigation options for users.


The primary menu is generally the most visible and important navigation menu, while the secondary menu offers more options or supplementary links to enhance navigation within the website. These menus can be customized and added using WordPress's built-in menu functionality.


How do I enable or disable a menu item in WordPress?

To enable or disable a menu item in WordPress, you can use a combination of CSS, PHP, or a plugin depending on your specific needs. Here are a few methods:

  1. Using CSS:
  • Go to your WordPress admin dashboard and navigate to Appearance > Customize.
  • Click on Additional CSS.
  • Add the following CSS code to disable a menu item:
1
2
3
#menu-item-id {
    display: none !important;
}


Replace menu-item-id with the ID of the menu item you want to disable. You can find the ID by inspecting the menu item element using your browser's developer tools.

  1. Using PHP:
  • Install and activate the "Code Snippets" plugin from the WordPress repository.
  • Go to Snippets > Add New in your WordPress admin dashboard.
  • Add the following PHP code to disable a menu item:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
function disable_menu_item($items, $menu) {
    $disabled_menu_items = array('menu-item-id1', 'menu-item-id2');
    foreach ($items as $key => $item) {
        if (in_array($item->ID, $disabled_menu_items)) {
            unset($items[$key]);
        }
    }
    return $items;
}
add_filter('wp_nav_menu_objects', 'disable_menu_item', 10, 2);


Replace menu-item-id1 and menu-item-id2 with the IDs of the menu items you want to disable.

  1. Using a Plugin:
  • Install and activate the "Menu Item Visibility Control" plugin from the WordPress repository.
  • Go to Appearance > Menus in your WordPress admin dashboard.
  • Edit the menu item you want to enable or disable.
  • Configure the visibility settings to enable or disable the menu item based on your requirements.


Note: If you're not comfortable with CSS or PHP, using a plugin is the easiest option as it provides a user-friendly interface to manage menu item visibility.

Facebook Twitter LinkedIn Telegram

Related Posts:

To create a custom login page in WordPress, you will need to follow these steps:Create a new PHP file: Start by creating a new PHP file for your custom login page. You can name it according to your preference, like "custom-login.php". Add the necessary...
In TensorFlow, you can implement custom layers to extend the functionality of the existing layers or to create your own neural network layers. Custom layers allow you to define complex operations, handle non-standard data types, or implement specialized networ...
Creating a custom WordPress theme allows you to have full control over the design and functionality of your website. Here are the steps involved in creating a custom WordPress theme:Set up a development environment: Install WordPress on your local computer usi...