Twenty fourteen responsive menu
-
Hello everyone,
I’m using a child-theme of twenty fourteen
I would like to change the menu content with tablet and mobile.I did register my menu in function.php and it is recognise in the admin menu panel.
function register_my_menus() { register_nav_menus( array( 'tab-menu' => __( 'Tablet Menu' ), 'mobile-menu' => __( 'mobile Menu' ) ) ); } add_action( 'init', 'register_my_menus' );
I did add them on the header and the menus are recognise
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?> <?php wp_nav_menu( array( 'theme_location' => 'tab-menu', 'menu_class' => 'tab_menu' ) ); ?> <?php wp_nav_menu( array( 'theme_location' => 'mobile-menu', 'menu_class' => 'mobile_menu' ) ); ?>
So in the .css I’m switching menus with media queries (the problem should be around here:
/* hide tab and mobile menu */ .tab_menu, .mobile_menu { display:none; } @media screen and (max-device-width : 480px) { .primary-navigation{ display:none; } .mobile_menu { display:block; } } /* Tablets and lower */ @media screen and (max-width: 1008px) { .primary-navigation { display:none; } .tab_menu { display:block; } }
So it is not working, The real navigation is hiding, I tried to hide the all the IDs and classes around.
My question is… is there a simple way to change the content of the menu (or to add a menu) for each device (desktop, tablet or mobile)
I hope i was clear, here is the website (but i keep the same menu for the moment) https://www.sifacil.fr
- The topic ‘Twenty fourteen responsive menu’ is closed to new replies.