Title: Problem with menu from scratch in wordpress.
Last modified: June 4, 2018

---

# Problem with menu from scratch in wordpress.

 *  Resolved [mcamposs](https://wordpress.org/support/users/mcamposs/)
 * (@mcamposs)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-menu-from-scratch-in-wordpress/)
 * I’m creating a theme in wordpress from a Bootstrap 4 template.
    But I have a 
   problem with the menu. When I add any menu plugins in the dashboard, none of 
   them work in the frontend, always showing an unordered list items. I deleted 
   all the bootstrap code. Function.php:
 *     ```
       // Registramos 2 Menús
       add_theme_support('nav-menus');
       function registrar_mis_menus() {
         register_nav_menus(
           array(
             'menu-header' => __( 'Menú Páginas Superior' ),
             'menu-footer' => __( 'Menú Páginas Footer' )
           )
         );
       }
       ```
   
 * header.php
 *     ```
       <?php 
       	wp_nav_menu( array( 
       	'theme_location' => 'menu-header',
       	) );
       ?>
       ```
   
 * I have wordpress 4.9.2. The latest versions of WP Mega Menu, Max Mega Menu, Responsive
   Menu, etc..
    -  This topic was modified 7 years, 11 months ago by [mcamposs](https://wordpress.org/support/users/mcamposs/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [mcamposs](https://wordpress.org/support/users/mcamposs/)
 * (@mcamposs)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-menu-from-scratch-in-wordpress/#post-10363177)
 *     ```
       // Registramos 2 Menús
       add_theme_support('nav-menus');
       function registrar_mis_menus() {
         register_nav_menus(
           array(
             'menu-header' => __( 'Menú Páginas Superior'),
       	  'menu-footer' => __( 'Menú Páginas Footer')
           )
         );
       }
       add_action( 'init', 'registrar_mis_menus' );
       ```
   
    -  This reply was modified 7 years, 11 months ago by [mcamposs](https://wordpress.org/support/users/mcamposs/).
 *  [Anass Rahou](https://wordpress.org/support/users/ranss/)
 * (@ranss)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-menu-from-scratch-in-wordpress/#post-10363187)
 * Hello there!
 * First of all, here you have a more practice code of how to register navigation
   menus in WordPress programmatically.
 *     ```
       // Register Navigation Menus
       function ar_navigation_menus() {
   
       	$locations = array(
       		'menu_header' => __( 'Menú Páginas Superior', 'text_domain' ),
       		'menu_footer' => __( 'Menú Páginas Footer', 'text_domain' ),
       	);
       	register_nav_menus( $locations );
   
       }
       add_action( 'init', 'ar_navigation_menus' );
       ```
   
 * As you can see, with the function `register_nav_menus` you do not need to call`
   add_theme_support( 'menus' );` function.
 * After that, you will need to add `menu_class` and/or `menu_id` arguments to `
   wp_nav_menus` that your theme is using to design the menus.
 * You have a lot of arguments that you can discover on the link down bellow, and
   all the posibilites they can help you to make a great menu.
 * [https://developer.wordpress.org/reference/functions/wp_nav_menu/](https://developer.wordpress.org/reference/functions/wp_nav_menu/)
 * Let me know if this helps you.
 *  Thread Starter [mcamposs](https://wordpress.org/support/users/mcamposs/)
 * (@mcamposs)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-menu-from-scratch-in-wordpress/#post-10363992)
 * Hello Anass,
 * Excellent. Everything works perfect. Very good!
 * Highly very grateful.
 * Mario Campos
 *  [Anass Rahou](https://wordpress.org/support/users/ranss/)
 * (@ranss)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-menu-from-scratch-in-wordpress/#post-10364010)
 * Perfect!
 * Glad to help you!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem with menu from scratch in wordpress.’ is closed to new replies.

## Tags

 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [register_nav_menus](https://wordpress.org/support/topic-tag/register_nav_menus/)
 * [style](https://wordpress.org/support/topic-tag/style/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 2 participants
 * Last reply from: [Anass Rahou](https://wordpress.org/support/users/ranss/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/problem-with-menu-from-scratch-in-wordpress/#post-10364010)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
