Last active
December 19, 2015 03:09
-
-
Save GhostToast/5888469 to your computer and use it in GitHub Desktop.
Creates a dropdown menu from a WordPress Nav Menu. Useful for sitting alongside regular menu for use in responsive designs, or where there's no room for a regular menu. Gracefully nests.
Thanks. I thought about this over the weekend and realized I had nothing in place to indicate a non-link parent (where href="#"), so made a provision for that. I also realized I was making some goofy unnecessary calls to get page_id and whatnot, not realizing the menu_item had all the info I needed, so tidied that up a bit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good job, I have a similar snippet I've written that I use on a regular basis for just this very purpose. It's very useful, given that more and more sites need a responsive alternative or like you said, where a normal menu may not fit a given layout. Thanks for your contribution.