Support » Fixing WordPress » Responsive Menu Without Bloat Recommendations?

  • bhagwad

    (@bhagwad)


    I want to convert my regular menu into a “Hamburger” or similar collapsible menu – especially for mobile devices.

    I know there are plugins for this, but they all have a lot of bloat. For example, my page download size goes from 120 KB to 210 KB! And they also load a bunch of external resources that can add around 70% to my total page resource usage.

    I’m looking a lightweight solution for this without bloat. Something simple with a footprint of maybe 5-10 KB. Do you guys have any plugin recommendations or ideas?

    Thanks for any help in advance!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    For something that lightweight, you will likely need to develop your own solution. Many plugins will use jQuery, which is automatically another 100kB at least. There are examples of pure CSS menu solutions. Search for “pure css mobile menu” and select one that works with the usual ul/li structure output by wp_nav_menu().

    Place the CSS you want to use in the Additional CSS panel of the customizer. If you need other classes in the menu HTML to get it all to work, you can alter the the output from wp_nav_menu() through one of its several filters. However, you can likely use the existing classes by altering the selectors used in the CSS.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.