I use the WPTouch plugin to make my blog responsive. My theme is twenty twelve newest Version 2.2.

WPTouch works fine in mobile mode. My problem is that the twenty twelve theme activate the responsive menu, when the width of desktop is less than 600px in desktop mode.

I tried to unregister the script like here: http://wpbeaches.com/de-register-de-queue-wordpress-loaded-scripts-styles/

I also tried to delete the wp_enqueue_script completely in functions.php:

wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(  'jquery' ), '20140711', true ); 

But the mobile menu is still active, when width is lower than 600px.

Can anybody help?

1 Answer 1


Delete wp_enqueue_script navigation wont work as the navigation were being registered and stored on the database. So for this you need to deregister navigation using the code below:

add_action( 'wp_print_scripts', 'deregister_navscript', 100 );
function deregister_navscript() {
     wp_deregister_script( 'twentytwelve-navigation' );

This code unregisters the javascript used to toggle the default responsive menu.

Add CSS to hide the default 2012 menu button and to hide the UL menu when the select menu is displayed. Insert the following code in your theme style.css:

/* hide the default responsive menu and menu button */
h3.menu-toggle {display: none}
.main-navigation ul.nav-menu, .main-navigation div.nav-menu > ul {display: none;}
  • I put your code in functions.php but the responsive menu is still active. Thank you for help!
    – CapoPM
    Commented May 1, 2017 at 8:54
  • The button is hide, but the menu is still active.
    – CapoPM
    Commented May 1, 2017 at 8:56
  • i believe there is some media queries in the theme's style.css that overiding the code. Could you also give your site url so that i could see the problem?
    – Aishan
    Commented May 1, 2017 at 10:01
  • You are right! Now the menu is unregister. But now i have another problem. Under 600px now is no menu. I want the standard primary menu also for the small size resolution in desktop mode.
    – CapoPM
    Commented May 1, 2017 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.