• losrack

    (@carlos-jaramillo)


    Hi,

    I used this code to rename my handheld navigation

    function storefront_primary_navigation() {
    		?>
    	<nav id="site-navigation" class="main-navigation" role="navigation">
    		<button class="menu-toggle"><?php _e( 'Menu', 'storefront' ); ?></button>
    		<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    	</nav><!-- #site-navigation -->
    	<?php
    }

    the problem is that when toggling to handheld, it does appear but it doesn’t do anything nor it shows the page links and all.

    Thanks in advance for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can use below code to register a new menu
    register_nav_menu(‘main-menu’, __(‘menu primary’));

    And in header.php add:
    <div class=”header-menu”>
    <?php
    if ( has_nav_menu( ‘main-menu’ ) ) {
    wp_nav_menu( array( ‘theme_location’ => ‘main-menu’, ‘container’ => false ) );
    }
    ?>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hendheld navigation rename problem’ is closed to new replies.