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 couldnt find...
tried 'submenu_class' => 'customname'
:D seems logic to me, but obviously that is no the right one..
any ideas?
This may be useful to you
How to add a parent class for menu item
Adding Conditional Classes to Menu Items
For reference : click me
replace class:
This is an old question and I'm not sure if the solution I'm going to mention was available by the time you asked, but I think it's worth mentioning. You can achieve what you want by adding a filter to
nav_menu_submenu_css_class
. See the example below - you can replacemy-new-submenu-class
by the class(es) you want:You can just use a Hook
where
I would suggest to replace your cutomclass css class name to sub-menu. use find and replace: ie. find: .customclass replace with .sub-menu, works for me.
Like it always is, after having looked for a long time before writing something to the site, just a minute after I posted here I found my solution.
It thought I'd share it here so someone else can find it.
This is where I found the solution: Solution in Wordpress support forum