Support » Theme: Twenty Twelve » Menu not opening on smartphones

  • Resolved enricolino


    Hello there,

    I have an issue with my twenty-twelve child theme on The menu doesn’t open on mobile devices. I tried to turn off all plugins but it didn’t help. I tired also to switch back to twenty twelve original theme and in this case the menu works fine. Could anyone please help?

    I’d appreciate it

    Thanks in advance


Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins


    WCLDN 2018 Contributor | Volunteer support

    Replace this in your Child Theme header.php file:

    <h3 class="menu-toggle">Menu</h3>

    With this:

    <button class="menu-toggle">Menu</button>

    Thanks a lot Andrew, this worked fine :)!!!!! Have a great wekend….


    This solution was already the original code for me, so I had to look for a fast and simple solution by myself and I post it here to help those who faced the same bug as me.
    You can inject a bit of javascript in header.php to toggle the ul menu tag:
    – go to the wp editor for header.php
    – find
    <button class=”menu-toggle”><?php _e( ‘Menu’, ‘twentytwelve’ ); ?></button>
    – just add a bit of javascript as follows:
    <button class=”menu-toggle” onclick=”el = document.getElementById(‘menu-menu-principal’); = ( != ‘inline’ ? ‘inline’ : ‘none’);”><?php _e( ‘Menu’, ‘twentytwelve’ ); ?></button>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Menu not opening on smartphones’ is closed to new replies.