Dropdown Menus Plugin for WordPress

Business News

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.

64 responses to “Dropdown Menus Plugin for WordPress

  1. hi there
    I upgraded wordpress to 3.9.2 and am getting this :

    Strict Standards: Declaration of DropDown_Nav_Menu::end_lvl() should be compatible with Walker_Nav_Menu::end_lvl(&$output, $depth = 0, $args = Array) in /home/tomfawth/public_html/wp-content/themes/goodspace-v1-08/include/plugin/dropdown-menus.php on line 0

    Strict Standards: Declaration of DropDown_Nav_Menu::start_el() should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /home/tomfawth/public_html/wp-content/themes/goodspace-v1-08/include/plugin/dropdown-menus.php on line 0

    Strict Standards: Declaration of DropDown_Nav_Menu::end_el() should be compatible with Walker_Nav_Menu::end_el(&$output, $item, $depth = 0, $args = Array) in /home/tomfawth/public_html/wp-content/themes/goodspace-v1-08/include/plugin/dropdown-menus.php on line 0

    I am using the goodspace theme on wordpress !

    my site is now broken white screen!

    can you help?

    thanks

    bo

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

  3. 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?

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

  5. hello there! i’m trying the plugin, and apparently the “make it go” it’s not working at all, i would try to fix it but maybe i’m doing something wrong… any ideia?

Leave a Reply

Your email address will not be published. Required fields are marked *