Wordpress Toggle Menu has stopped working

WordPress Development Asked on January 2, 2022

I am using the twentyfifteen theme on my wordpress site. When you access the site on mobile or resize on your browser so that the page height > width, a hamburger icon appears on the upper right. I used to be able to click on this button and see my main navigation menu.

For some reason, the button has stopped working. It does absolutely nothing when you click on it. I checked it out with the inspector, it’s a button and the class is secondary toggle.

There is no error message appearing in the console.

I went on an example page, and the code in the inspector looks a bit different there:

<button class="secondary-toggle" aria-expanded="false" aria-controls="secondary">Menu and widgets</button>

Mine appears like so in the inspector:

<button class="secondary-toggle">Menu and widgets</button>

I tried adding the aria control stuff manually into my code, it then appears on the inspector but I’m still not able to open the menu.

Has anyone else experienced anything similar? Any tips on how to get it working again?

UPDATE: I had taken out a lot of the stuff in footer.php and replacing it seemed to make the aria-controls stuff reappear. Now the html for my button looks exactly the same…but, the menu button still doesn’t toggle.

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP