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!

Related Questions

No more get_option(‘date_time’) in WordPress 5.5?

1  Asked on February 10, 2021 by wittich


How should I tackle this situation?

0  Asked on February 9, 2021 by remus


How to create an anonymous forum?

0  Asked on February 8, 2021 by keyrands


Detect if REST API is running

2  Asked on February 8, 2021 by tom-j-nowell


Create a bulk action to pass user profiles into a CPT

0  Asked on February 6, 2021 by zaesar


Can’t update WordPress with Admin Users

0  Asked on February 4, 2021 by charlene-the-web-design-queen


Get Child Category only

1  Asked on February 2, 2021 by joamika


MULTISITE: Password issue and Error Cant access site

3  Asked on January 31, 2021 by msn_administrator


Ask a Question

Get help from others!

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