To display a menu you need to use the wp_nav_menu
function (Codex reference).
Try changing your template file to use the following code:
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
Related Posts:
- Add a #hash to the links in my custom menu
- How to add menù section to my WordPress template?
- How to add posts to custom menus?
- wp_nav_menu(), how to change class?
- Display Menu Name using wp_nav_menu
- What’s the difference between home.php and index.php?
- Add custom classes to anchor in wp_nav_menu
- How to move page templates to custom folder?
- Is it possible to manipulate the list of page templates?
- How to use logout function on custom menu link?
- How to display wp_nav_menu() conditionally only when not on a 404 page?
- Retrieve the template directory URI via global or get_template_directory_uri() every time?
- Add a preview to a WordPress Control Panel
- Problem with registering menus – What to do when other solutions aren’t working?
- How can i change menu link when page content empty?
- How to load different CSS in different Header?
- Select menu on browser resize
- Returning Variables back into a template
- How to add (css) classes to only one wp_nav_menu()?
- How to override BuddyPress 3.0 bp-nouveau theme files?
- Displaying wp menus by name without using theme locations
- WordPress nav_menu_css_class theme filter is not being called
- Any tag pagination page (except the 1st page) loads index.php template instead of tag.php
- Create self-populating menu and add extra divs to the menu layout
- New template, where to place CSS?
- How to remove class attributes from custom menu markup?
- 2 differen’t menus and it’s using same items in both
- Is there an action for save_menu and/or update_menu?
- wp_nav_menu add something before closing container and after last list item
- Find the Children of a Page then Echo it as a Bulleted List of Links (menu)
- create-guten-block in wordpress theme?
- WordPress navbar with logo in middle [closed]
- Override template file i subfolders
- wp_post->post_parent object returning 0
- multisite: global menu containing network site links?
- How to make theme elements customizable in wordpress?
- Primary navigation menu & footer not showing in category / tag page
- Do i need to keep all the default WP templates files in a theme?
- How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?
- Where am I doing wrong in my theme menu?
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Recommended method for updating/adding menus when adding new theme
- Admin: sub menu doesnt display under apperance when activate my themes
- Template for landing pages
- How to Create custom xml file for demo content for custom theme?
- How should I use starter content utility to show some default menus?
- How to create and populate with few links a menu in child theme functions.php?
- How to seperate static phrases from template files in custom theme?
- Second menu has the first menu ID
- wp_nav_menu and its fallback
- Thesis -style Navigation
- Post and page content not displaying in search results
- Theme development – Automatically menu creation
- Theme development: How to add CSS classes to menu items?
- Templates dropdown not appearing using _s theme (underscores)
- Navbar- disable “onClick” drop-down
- Create theme for mobile phones and tablets only?
- Some doubts about WordPress handle the horizontal main menu visualization
- How to create a WP theme that use BootStrap? [closed]
- How to conditionally add a wp_filter
- Remove/Hide a Widget on a Custom Template
- Custom nav menu not showing
- Parent/Child pages
- .current_page_ancestor broken in Twenty Eleven
- finding menu hierachy > wp_get_nav_menu_items
- How to substitute old wordpress menu by wp 3 menu the right way?
- WordPress custom menu can’t show 3. level submenu
- How to Modify WP_Includes/blocks/latest_posts.php
- Best way to give user the option to make a menu, mega menu?
- Programatically Created Menu not Editable in Dashboard
- Building a custom menu or use a plugin?
- How to implement pagination in category.php template
- Theme: dropdown hover menu not showing up in IE/Edge
- How can I show a custom WordPress menu anywhere I want on my website?
- Show all menu levels except top level. How to exclude top level of a menu?
- Menu is in Reversed order
- WordPress Menu item > Sub menu Class update
- Using wp_add_inline_style Inside a Template File
- How to know and change the machine name of a menu?
- WordPress menu walker – Get parent item text inside end_lvl function
- How to achieve this navigation style in wordpress navigation
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- Display content on Single page
- Create a variable with string, array or multiple values
- After theme change the menus have to be manually linked to the corresponding theme location
- How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?
- Horizontal Navigation
- What’s the policy for building a theme that doesn’t support widgets/menus?
- Enable WP to accept standard jQuery code embeding between the tags [duplicate]
- How can I change the title of the Home link in the navigation bar?
- Header links also appearing in the footer
- How to make navigation a list without a plugin? [duplicate]
- What is the advantage of using home.php over index.php for the front page
- How to highlight current menu bar base on the URL?
- Global Navigation menu in diiferrent wordpress setups
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- Add wrapper for a specific sub-menu
- What is the point of using the front-page.php template? [closed]
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- Dynamic nav menu with icons [closed]