Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

As you know, there are input boxes for CSS Classes (optional) on each menus.

But it's not showing (coming out) in source. Is there any function for disable for CSS Classes (optional)? I need to find it and remove it.

my another sites work fine like this. I put "navi_box1" on Menu1 as CSS Class. and it shows right spot.. <ul id="menu-menu-box" class="menu"><li id="menu-item-422" class="navi_box1 menu-item menu-item-type-custom menu-item-object-custom menu-item-422"><a href="/" class="has-submenu">Menu1</a> ..........etc....... </ul>

this is the codes for navi..

    wp_nav_menu( array( 'container' => false, 'menu_class' => 'left', 'theme_location' => 'primary', 'fallback_cb' => 'sweetdate_main_nav', 'walker'        => new sweetdate_walker_nav_menu) );

the name of theme_location is right.

share|improve this question
1  
Do you have menu assigned to this location? –  Krzysiek Dróżdż Jul 12 '13 at 12:13
add comment

1 Answer

up vote 1 down vote accepted

The obvious answer is that sweetdate_walker_nav_menu, which is the walker that creates this menu, is written is such a way as to not print those classes. It is hard to say for sure without seeing the code for that custom walker but you can remove the 'walker' => new sweetdate_walker_nav_menu argument to verify that that is the problem. If it is you'd have to write code into the walker so that it uses those classes.

There is also a filter called nav_menu_css_class which I believe is what one would use to remove those classes. However, there are numerous other filters in nav-menu-template.php and nav-menu.php that could potentially be involved.

share|improve this answer
    
yes you are right. it's more complicated for me to fix.. I will try without sweetdate_walker_nav_menu. thanks. –  pulla Jul 14 '13 at 14:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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