有没有办法将自定义类应用于WordPress菜单<ul>
?是否存在'class' => 'my_class'
类型的参数?
我用
<?php wp_nav_menu( array( 'theme_location' => 'custom-menu' ) ); ?>
答案 0 :(得分:3)
这应该有效,我想:
<?php wp_nav_menu( array('theme_location' =>'custom-menu',
'menu_class' =>'your-class')); ?>