Override theme hamburger menu to work without javascript (noscript)

Classic Themes

What wordpress hooks can be used to override how the primary menu is displayed in my wordpress header’s navigation menu — ideally in a way that will work cross-theme.

This isn’t possible to do in a cross theme way, and there is nothing in WP that indicates if a hamburger menu is used, or APIs for implementing one. Each theme does its own thing.

You can filter nav menu markup but different themes display menus in different ways, in different places, with different styles. A lot of themes don’t use the standard nav menu API directly to display their menus, especially those that implement more unusual menus such as hamburger or mega menus.

Detecting if a theme even has a hamburger menu to begin with isn’t possible.

The best you can hope for is to replace all the HTML classes with your own, add your own styling, and hope it doesn’t clash with the styling already in the theme. This will probably break the theme, and has no guarantee that it wouldn’t be broken by styling.

In addition to that, different themes use different methods to implement hamburger menus, and there is no WordPress level support to disable or replace this as it isn’t WordPress providing the hamburger menu.

So any plugin you write would need to have code for each and every specific theme you want to support, assuming those themes can be adjusted. You’ll need to download and read through how each theme implements its hamburger menu.

Block Themes

Block themes however provide a much easier solution, create a plugin that adds a hamburger menu block, and tell users to use it in their theme.

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino