wp_nav_menu change sub-menu class name?
Asked 07 September, 2021
Viewed 2.7K times
  • 60
Votes

Is there a way to change the child <ul class="sub-menu"> generated by WordPress itself to a custom class name?

I know the parent <ul> you can remove or change the name with 'menu_class' => 'newname'.

I couldn't find the answer. Itried 'submenu_class' => 'customname'. It seems logic to me, but obviously that is no the right one.

any ideas?

13 Answer