Cleanup: Moved inline JavaScript to own file, cleaned up CSS stylesheet and deleted unneeded options from database

This is quite a big update! Let’s explore the big changes a little more.

MD Popups Integration

This is the best part and you’re going to love how little work is required to get the popup of your choice showing in the Main Menu.

After you’ve created a popup with MD Popups, head over to Appearance > Customize > Main Menu and you’ll see a list of your popups to choose from. Simply select the popup, save, and MD will take care of the rest.

Want to see a demo? Just try out the menu you see here at the top of Kolakube.

Simplified Search bar design

MD Main Menu has always had neat search functionality. Click the little search icon to the far right and any content you had on that side of the menu (like social media icons) will be replaced with a search bar.

…the only problem was the search bar had a clunky design and was often misaligned. This update removes all design elements from the search bar and now shows a simpler input area.

Fixed Meta Box Options

A key feature of MD Main Menu is the ability to add/remove the menu on an individual post/page basis by adding simple checkbox options to the “Layout” meta box in MD.

At some point these options stopped saving, breaking this important feature.

This update fixes that issue. You can also set a custom Menu on an individual post/page basis as well. It’s all in the details!

Under-the-Hood Improvements

I committed a huge development sin in the last version of MD Main Menu: I printed a ton of JavaScript into your sites footer. The JavaScript is necessary for the interactive features like the search bar expander and content tab switcher on mobile to work.

I’m no JavaScript expert, but I’ve come a long way since I wrote the initial script for this menu back in 2014. This update moves the JavaScript into its own main-menu.js file and significantly cleans up your site’s source code.

The code itself still has a ton of room for improvement, but the main focus of this update was just to get it out of your source code—and version 1.1 achieves this beautifully.

I also spent some time minimizing the additional CSS needed to style the menu and deleted some old options the menu added to the database. A smaller CSS file and a leaner database are victories for everyone!

The Future of MD Addons is Bright

I must sound like a broken record to some of you by repeating this, but I’m very excited for the future of MD and damn proud of how far its progressed. More and more people are creating outstanding websites with Marketers Delight and its addons like this that add the missing features to your website.

I can’t wait to show you the new stuff I’ve been cooking up. In the meantime, leave a comment below and let me know how you’re using the MD Main Menu on your own site and if you have any suggestions for Marketers Delight as a whole. Talk to you soon.