最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

functions - Wordpress Toggle Menu has stopped working

programmeradmin8浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论