Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a menu with a long list of submenu items. I'd like to split that up into columns and the easiest way in my mind would be to have them split up into multiple . Is there a way to do this?

Alternatively, I've currently have the submenu items in four different menus (so that I can display them in four columns in the footer). Is it possible to put those menus in my main menu as submenu items?

share|improve this question

1 Answer 1

You can use the Walker class to customize your menus however you like.

A simple example of using Walker to create a custom menu can be found on the official WordPress Codex, here:

http://codex.wordpress.org/Class_Reference/Walker#General_Menu_Example

To do what you want using Walker, you would probably want to ensure that your menu has X parent items (where X is the number of columns you want), and each of your menu items is organized under one of those.

You would then use the Walker::start_lvl() and Walker::end_lvl() to output the container HTML for each of your columns, and Walker::start_el() to output each individual item.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.