Select Page

WordPress – how to load Ubermenu with Ajax

28

Feb, 2019

This is a howto for developers.  If you’re not happy digging around in functions.php or indeed with your sleeves rolled up in any php, then this article might not be for you.

Ubermenu is a great plugin and provides Users and WordPress builders with a huge amount of power to generate sexy menu systems.

But if you’re at all worried about pagespeed and load times then Ubermenu might be more your enemy than your friend.

However, sometimes, you just don’t have a choice.  Your customer wants a nice sexy menu and you’ve been out voted.

So why not load it after the page load.

Ubermenu API is non-existent

Looking at the Ubermenu documentation and through the forums, you won’t find that much help on how to tweak around with Ubermenu.  In fact, they seem to keep pretty tight lipped on how to configure and load Ubermenu in javascript.

So, in this article, I’m going to show you how to include the wordpress menu in the original page markup and then overwrite this with an Ubermenu using Ajax.

Getting started

I’m Another Standard Image Caption.
Photograph by Lorem Ipsum via Unsplash
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel. Aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae. I’m a Standard Link. Justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi.

Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,

Want new articles before they get published?
Subscribe to our Awesome Newsletter.