Dropdown Menus Plugin for WordPress

I’ve been enjoying the WordCamp event down in Portsmouth immensely this weekend. It’s always good to catch up with folks I know and meeting folks I didn’t know like those very sound chaps from humanmade.

To get to the point of this blog post though I have written a plugin in response to a comment made by Rachel McCollin during her talk on WordPress and Mobile.

When designing for small screens every pixel counts. One of the common difficulties we face as web designers is how to reduce the amount of pixels some large (or potentially large) constructs like menus take up. One solution is to use a dropdown menu. For example in a responsive design like that seen on informationarchitects.jp or fivesimplesteps.com at smaller screen sizes the more traditional menu of links is replaced by a dropdown.

Rachel’s point was that there isn’t an easy way to make a menu that you manage via the admin panel into a dropdown. Because I’ve worked a lot recently with custom menu walkers I decided that it should be and couldn’t help myself…

So, here it is. A plugin that provides an alternative function to wp_nav_menu(); that will output the menu as a dropdown and also provides a widget that can be dropped into a widget space.

There are likely to be a few improvements and tweaks that can be made to awesome it up a bit but if nothing else it’s a start. You can find the dropdown menus plugin in the WordPress repository here. Hope it comes in handy for some of you.

To use it you either use the function dropdown_menu() in place of wp_nav_menu() or use the widget provided with the plugin.

There’s some more background on how to use this in a responsive design (as well as an alternative method using only javascript) here on Chris Coyier’s css-tricks.com.

Comments
  • Ужас! 2 / Aug / 2013 at 3:17 pm

    ужас, че за лажа, обновила плагин и вообще все так ужасно стало… был нормальный сайт, а теперь не знаю как все вернуть.

  • Nick Bowman 8 / May / 2013 at 11:40 pm

    Hi, I am using a wordpress theme called rt-theme-17 which uses your awesome plugin for the dropdown menu in responsive “mode”. It works pretty well, but when I use this the access control plugin – http://wordpress.org/extend/plugins/wordpress-access-control/ – it breaks the dropdown menu.

    I canøt figure out what is going wrong and why, can you help me?

  • Bruno 26 / Apr / 2013 at 9:40 pm

    Sorry for the comment below!!! the wp_footer() was missing =)

1 2
css.php