Title: Mobile Menu
Last modified: May 26, 2021

---

# Mobile Menu

 *  Resolved [atlantichealthcareproducts](https://wordpress.org/support/users/atlantichealthcareproducts/)
 * (@atlantichealthcareproducts)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/mobile-menu-206/)
 * I created a mobile menu using the below code and would like to know how to activate
   it on function.php – Please help.
 *     ```
       // register a mobile menu
       function wdm_register_mobile_menu() {
           add_theme_support( 'nav-menus' );
           register_nav_menus( array('mobile-menu' => __( 'Mobile', 'wdm' )) );
       }
       add_action( 'init', 'wdm_register_mobile_menu' );
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmobile-menu-206%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [atlantichealthcareproducts](https://wordpress.org/support/users/atlantichealthcareproducts/)
 * (@atlantichealthcareproducts)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/mobile-menu-206/#post-14487596)
 * <div class=”mobile-menu” aria-label=”<?php esc_attr_e( ‘Mobile’, ‘blossom-speaker’);?
   >”>
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_id’ => ‘primary-
   menu’, ‘menu_class’ => ‘menu main-menu-modal’, ) ); ?> </div>
 *  [blossomthemessupport](https://wordpress.org/support/users/blossomthemessupport/)
 * (@blossomthemessupport)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/mobile-menu-206/#post-14490675)
 * Hi [@atlantichealthcareproducts](https://wordpress.org/support/users/atlantichealthcareproducts/),
 * If you make the change directly on the main theme files then on the update all
   of the changes will be lost. So, you need to create a child theme for the changes.
 * You can find many plugins to create a child theme which will also import the 
   parent theme customizer setting to the child theme.
 * One of the links to the plugin is – [https://wordpress.org/plugins/child-theme-configurator/](https://wordpress.org/plugins/child-theme-configurator/)
 * You can install and activated the plugin via Dashboard > Plugins > Add New and
   search for Child Theme Configurator.
 * After that, you can add the code in the functions.php file.
 * Thank you.
 *  Thread Starter [atlantichealthcareproducts](https://wordpress.org/support/users/atlantichealthcareproducts/)
 * (@atlantichealthcareproducts)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/mobile-menu-206/#post-14495384)
 * I believe you misunderstood my question.
 * I already completed the steps you are proposing.
 * My question is! how do I implement the mobile menu to wp_nav area of the blossom
   speaker function.php
 * ALREADY ADDED TO FUNCTION.PHP:
    // register a mobile menu function wdm_register_mobile_menu(){
   add_theme_support( ‘nav-menus’ ); register_nav_menus( array(‘mobile-menu’ => 
   __( ‘Mobile’, ‘wdm’ )) ); } add_action( ‘init’, ‘wdm_register_mobile_menu’ );
 * HOW DO I MAKE IT WORK WITH?
    <div class=”mobile-menu” aria-label=”<?php esc_attr_e(‘
   Mobile’, ‘blossom-speaker’ ); ?>”> <?php wp_nav_menu( array( ‘theme_location’
   => ‘primary’, ‘menu_id’ => ‘primary-menu’, ‘menu_class’ => ‘menu main-menu-modal’,));?
   > </div>
 *  [blossomthemessupport](https://wordpress.org/support/users/blossomthemessupport/)
 * (@blossomthemessupport)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/mobile-menu-206/#post-14503129)
 * Hi [@atlantichealthcareproducts](https://wordpress.org/support/users/atlantichealthcareproducts/),
 * Sorry, we understood you wrong. We thought you were trying to add those codes
   on the function.php file and we suggested you create the child theme.
 * Now, we are not able to understand what are you actually trying to achieve with
   the additions of those codes?
 * Can you please explain what you are trying to do with the help of a screenshot
   or video? You can use Chrome extension [Lightshot ](https://chrome.google.com/webstore/detail/lightshot-screenshot-tool/mbniclmhobmnbdlbpiphghaielnnpgdp?hl=en)
   to take a screenshot and [Loom ](https://chrome.google.com/webstore/detail/loom-for-chrome/liecbddmkiiihnedobmlmillhodjkdmb)
   for recording video(recommended) straight from your browser.
 * Thank you.

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

The topic ‘Mobile Menu’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/blossom-speaker/1.1.1/screenshot.
   png)
 * Blossom Speaker
 * [Support Threads](https://wordpress.org/support/theme/blossom-speaker/)
 * [Active Topics](https://wordpress.org/support/theme/blossom-speaker/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/blossom-speaker/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/blossom-speaker/reviews/)

## Tags

 * [function.php](https://wordpress.org/support/topic-tag/function-php/)

 * 4 replies
 * 2 participants
 * Last reply from: [blossomthemessupport](https://wordpress.org/support/users/blossomthemessupport/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/mobile-menu-206/#post-14503129)
 * Status: resolved