Hello friends, welcome to my another blog how to change wordpress submenu class. If you create sub menu in WordPress it automatically create ul class=”sub-menu” and under this ul our li will go. This is the default layout. But if you create custom wordpress theme from a html template then your template may have another structure for submenu. So you need to change the wordpress sub menu markup to match your requirement.

Change wordpress default submenu class to custom class name

Add the below code to your theme functions.php



Now you are done. Refresh your browser and see the changes. Now you know how change wordpress submenu class.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
How to change wordpress submenu class
Tagged on: