- You need to edit functions.php andding the following line
<?php register_nav_menu( 'primary', 'Primary Menu' ); ?>
-
Then go in admin section Apearence-Menus and create one menu
-
In the header replace
<?php wp_list_pages('title_li=&depth=1'); ?>
for example (the primary menu) with:
<?php wp_nav_menu( array( 'theme_location' => 'primary')); ?>
more details for nav_menu here
Related Posts:
- How to insert a logo in the header?
- Add custom classes to anchor in wp_nav_menu
- Page template in two level deep folder
- How can I get wp_head() as a string instead of echoing it?
- Add a #hash to the links in my custom menu
- Select menu on browser resize
- Returning Variables back into a template
- Displaying wp menus by name without using theme locations
- How to highlight the current page in the nav menu?
- Setting a Default ‘Theme Location’ When Creating a Menu
- Custom Nav Walker Displaying Values in Sub Menu
- Where is definied the theme location for the main menu in a WordPress template?
- create-guten-block in wordpress theme?
- My Admin bar covers my sticky navbar [closed]
- Override template file i subfolders
- Single Page theme [closed]
- How to make theme elements customizable in wordpress?
- Where am I doing wrong in my theme menu?
- Admin: sub menu doesnt display under apperance when activate my themes
- How do I get the trackback count of a post in wordpress without writing an SQL query?
- 3 Level Deep Navigation Menu Not Showing All Levels
- Template for landing pages
- Thesis -style Navigation
- Why still output /wp-content/themes/twentynineteen?
- Create theme for mobile phones and tablets only?
- Why is my container argument not working for wp_nav_menu() [closed]
- Some doubts about WordPress handle the horizontal main menu visualization
- how to create/register menu items that can be added to menus later
- Why nav_menu_css_class doesn’t work with apply_filters?
- Theme: dropdown hover menu not showing up in IE/Edge
- Menu names not getting translated
- Primary Menu Showing All Pages With No Sub-Nav
- What’s the policy for building a theme that doesn’t support widgets/menus?
- Problem with multiple menus in theme
- How to make navigation a list without a plugin? [duplicate]
- What is the point of using the front-page.php template? [closed]
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
- Dynamic nav menu with icons [closed]
- Menu items description? Custom Walker for wp_nav_menu()
- Sizing screenshot.png without losing aspect ratio
- Should `get_template_directory_uri()` be escaped?
- Child Theme not loading parent CSS
- Use of undefined constant FS_CHMOD_DIR – assumed ‘FS_CHMOD_DIR’
- Replace Home with image link inside custom header menu
- index.php is not loaded for single posts
- Why use while over if in single wordpress posts?
- WordPress website loads but is not displayed until page scrolled
- How do I add a post to a menu
- Theme Customizer not loading
- Single Theme folder for Multiple WordPress
- How i can get widgets areas working in customizer?
- Cutomize Colors utility: How to add more configurable colors to a theme
- How to disable automatic colors in the Twenty Twenty theme?
- Part of Menu Item Hidden on Header Menu
- Disable front-page.php template
- Gutenberg – editor-font-sizes in functions not working
- WordPress post arrangement using post_class
- Customize the previous_post_link output
- How to use get_template_part instead of include_once?
- How to remove comment link title attribute?
- Create wordpress header with custom logo in between the menu splitting the menu into two equal parts [closed]
- Menu item added in wp_nav_menu_items filter is never highlighted
- Single page site with history.js
- Using a page as home, how do I prevent nav from setting both home and page links active?
- Edit footer via customizer
- loading blank white screen of slide
- Change submenu markup
- Child Theme’s style.css not loading in mobile browser
- Migrated WordPress site renders Chinese
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Broken theme, template is missing
- WordPress page/blog incorporated into static website
- Which cache is kicking
- searchform.php doesn’t work properly
- Customizer: get_preview_url() inside customize_save_after hook
- How to add custom meta box when you have a custom page template file
- Password protect a custom template
- Load different single.php templates according to post layout selection
- Is there a way to switch to another theme?
- New to WordPress – Read the Codex, Other Docs; Still Confused
- When trying to set title, not sure how to edit it for different pages
- Does wordpress add their own classes into nav menus?
- Post archives link yields a 404 Not Found
- static front page ONLY for certain themes?
- How to add cropped custom header image?
- Any way to change/add to the theme name dynamically?
- Let user to upload multiple time
- Different WP Rest API custom endpoints across different themes
- register_theme_directory() sees custom themes directory, but blank frontend
- How to create multiple pages in a client theme?
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- Theme automatically inserting “more” tag on every post
- How get the 10 most viewed pages (not post)
- Purchased Theme to Custom Made Theme? [closed]
- How to make website with many template that active [closed]
- Image Size wrong during upload
- Correct way to make a custom block theme responsive
- Is there a block to print post link standalone in a block theme?