0

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?

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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