1

I've seen people recommending to edit the wordpress default Walker to change the menu markup and create your own.

The problem with this is that I would like to change the markup of the submenu and leave the menu as it is.

In the walker function I only saw the functions start_lvl and end_lvl regarding the submenu creation. The functions itself lack of very useful comments... so I understood that lvl means "level" and with that they mean "sub-menu"...

But it doesn't seem to be any specific function to render the submenus. It seems they use the same one for the parent menu than for the submenu.

Any recommendation? I would like to create a menu like this and I'm having troubles.

enter image description here

  • 1
    I think this requires a lot of customization. Anyway, I too look for a solution to this specific use case. – Hareesh Sivasubramanian Oct 3 '15 at 19:13
0

The whole idea of a custom walker class is that you can customize the menu in detail. So, you can also leave the main menu as it is and build the submenus the way you give in the image.

However, as Hareesh indicates in the comments, this does require quite a lot of customization, especially if you want you theme to be widely applicable (meaning you'll have to take into account errors, such as missing images in the submenu). This might be a nice place to start understanding the walker class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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