You need to register custom menus in your theme – https://codex.wordpress.org/Function_Reference/register_nav_menu
You first need to register your menu in functions.php like so:
add_action( 'after_setup_theme', 'register_my_menu' );
function register_my_menu() {
register_nav_menu( 'primary', __( 'Primary Menu', 'theme-slug' ) );
}
Then, where you want your menu to appear – usually header.php – you call the function:
wp_nav_menu()
Related Posts:
- Remove Pagination in Appearance -> Menus -> Categories
- How to remove menu installed in wp-admin by a theme? [closed]
- Need Help Regarding Menu Magement in admin
- wp_is_mobile() inside js
- Changing the Order of Admin Menu Sections?
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Add separator to admin submenu
- Remove unusable metaboxes in nav menu management screen
- How do I fix this error: Warning: invalid argument supplied for foreach()?
- Menu is invisible in admin panel but it’s visible in front-end [closed]
- Add column to pages table
- Is it possible to add a filter for the output of nav-menu items in admin?
- How to make pages metabox display all hierarchy in menu admin?
- Hide pages depending on role
- How can I get an array/list of all current WordPress Admin Menu items?
- how to only add a top-level admin menu without it creating a sub-level-menu
- WP /wp-admin/admin-ajax.php produces 404
- Sort wp_nav_menu() by menu order
- Hiding Admin Page While Keeping Menu Expanded
- Wp menu add page link as custom empty link
- Missing Menus Structure
- show different admin menu to different user roles
- Navigation Menus Depth for specific menus
- Change name & menu_name for Profile in the default menu, w/o altering core files?
- Add column to pages table
- Change search results order for Admin -> Appearance -> Menus -> Pages -> View all
- WordPress menu not loading in the admin side appearence-> menu tab
- Programmatically add existing pages and subpages to Appearance Menu
- WordPress Plugin menu position overwrite other item
- Ad custom admin page like WordPress customizer [closed]
- Dynamic admin submenu
- Custom Menu Broken WP 3.8.1 Update
- Limit User Iinterface for Admin?
- In the Admin Dashboard, can I choose which sections to display?
- Rename menu items for All except super admin
- Admin top level menu, pointing to an external url
- WP admin style not refreshing
- enqueue script during add menu items means before save menu items
- In admin edit-menu screen, newly added menu items always go to the bottom of the list
- Additional navigation bar in header
- WordPress menu items automatically becoming empty custom links
- How to remove empty menu space when creating admin page without menu title using add_submenu_page
- How to work with a custom theme that someone else created before me? (details below)
- Restrict user to edit only edit a certain menu
- Roles see different top menu (nav menu)
- how to configure this type of menu
- how to create pages and link them to a menu
- Dashicons not showed for admin menu
- Menus not visible in Appearance after being registered
- How to separate sub-menu output and keep associated with parent
- How to create menu in Word Press 4.2.2?
- Appearance > Menus
- Removing menu item doesn’t get removed on edit post
- Customizing label/title output of admin nav_menu selecter
- Is It Possible To A Link To The Homepage From The Admin Sidebar?
- Create custom page and custom menu
- How to let the role “editor” to control the menu?
- Add custom fields to specific menus
- Rename Menu icon in Twenty seventeen theme
- Critical Error when editing menu
- Add Class to Specific Link in Custom Menu
- wp_nav_menu() loses ‘current-menu-*’ classes on single product page within category
- How is custom menu hierarchy output handled?
- How to fix strange 500 Error after Editing Menu?
- Override custom menu widget
- Placing widget to menu
- container_class doesn’t seem to be working
- Walker_Nav_Menu: Items not nested correctly
- Loop through Navbar, Output Icons
- Custom Walker anchor tag not inheriting attributes
- How to display dynamic content in start_lvl function
- Partial refresh of menu in customizer not working?
- remove everything from wp_nav_menu
- Menu API not switching menus?
- Can I insert elements anywhere into the results of wp_nav_menu()?
- How to include the parent page link in this wp_nav_menu walker
- How to show dynamic side bar on menu item [closed]
- modify menu item links dynamically
- load-{$page hook} and returned parameter
- Where is my menu editor
- WordPress Menu adds an unwanted slash before anchor
- How to automatically redirect to first item of second navigation level in a multi-level menu?
- Change link in menu on condition
- How to undo the last changes to a custom menu?
- add_menu_page does not render the expected result
- Getting the WordPress custom menu titles and outputting them in a theme
- Second Level Menu
- Is there any difference between widgets (used in order to manage menus) and register_nav_menus() in terms of performance?
- Adding menu title to custum URL
- Parent Menu Item Requires Two Clicks for Mobile Device
- Product categories are mixed when creating menu
- Add a menu item to the logged in users author page?
- Iterate through each menu item into a shortcode
- Image menu on responsive WordPress
- Set a different home link in nav menu
- Remove link from Page name in navigation bar
- Auto Filled Custom Menus for Custom Post Types?
- I want my homepage navbar to have different styling to the rest of my site, how can I do this?
- Problems with draft website pages
- Add acf custom fields so sub item in menus