Twenty Twelve Responsive/Mobile Menu Button Not Working
-
I have read through all of the threads on this topic, but none of the proposed solutions are fixing my problem, and I would be very grateful for some help. My site is is running with a twentytwelve-child theme. I moved the menu below the header image, but now the menu button that appears on smaller displays and mobile devices does nothing when you click on it. The site URL is HERE.
My header.php pastebin is HERE.
My footer.php pastebin is HERE.
Unfortunately, making the changes suggested in THIS THREAD did not work.
Other threads mentioned javascript issues, but the solutions were way over my head, and I think their issue was caused by something else anyway.
I know there are plugins that can address this, but I’d like to take care of this without that. Thank you so much!
-
In your Child Theme header.php file replace this:
<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>With this:
<button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>Thank you so much for responding. So, the menu button itself behaves differently. When you click it, it goes a different shade of gray as if it were pressed, but the menu below stays fully expanded instead of collapsing and expanding when the button is pressed. Any ideas?
After I made your suggested change, I mean.
You should disable your caching plugin when ever making changes to your site.
My caching plugin isn’t activated. I cleared my caches and tried in a different browser and on my mobile device. The menu stays expanded whether I click the button or not. Is it working for you if you navigate to the site?
You can view the source code of your Webpage to see that it is cached. Perhaps you need to create a thread on your plugin’s support section asking how to deactivate it correctly?
I saw your problem, and I recommended a fix. Yet you can’t implement it because you’re using a caching plugin.
Okay, pretty sure it’s not caching anymore because I deleted the plugin WP Super Cache. I checked the source code for the home page and the only mention of “cache” is something related to the calendar plugin. But still, when I click on the menu button, the menu stays expanded and does not collapse.
Thank you for helping me!!!
And if you get rid of this:
.main-navigation ul.nav-menu, .main-navigation div.nav-menu > ul { border-bottom: 0; border-top: 0; display: inline-block!important; text-align: left; width: 95%; }?
You should see the issue:
display: inline-block!important;I don’t mean to be frustrating… but are you telling me to remove that from my header.php file? I can’t find that anywhere in my header (or footer).
It’s in your Child Theme style.css file, sorry assumed you’d recognise it.
Oh right! Duh! I KNEW that looked familiar…
AHH! That made it work! Thank you!
It changed the way the menu looks in a full size browser… it’s not centered anymore and has some border lines, but I’ll take it! That was making me crazy!!!
I had hoped that when the menu collapsed, it would only show the top level headings until you clicked on one of them, but when you tap menu, the whole thing is fully expanded. You’ve been ridiculously helpful, but if you have any advice on that, I’d be eternally indebted. π
Thanks again, so much! You’re amazing!
The topic ‘Twenty Twelve Responsive/Mobile Menu Button Not Working’ is closed to new replies.