I've developing my own theme and I'm experiencing problem to generate menu link with my own class, here's my menus supposed to be:
<ul class="dropdown">
<li class="first current-menu-item menu-item-home menu-gray">
<a href="index-2.html"><span>HOME</span></a>
</li>
<li class="menu-red">
<a href="2cols-sidebar-right.html"><span>Fashion</span></a>
</li>
<li class="menu-orange">
<a href="2cols-sidebar-right.html"><span>Design</span></a>
</li>
</ul>
There's class "menu-red" or "menu-orange" will be different color on css. And this is how I print the main menus on template:
<?php
if ($main_menu):
print theme('links__system_main_menu',
array(
'links' => $main_menu,
'attributes' => array(
'id' => 'main-menu',
'class' => 'dropdown'
)
)
);
endif;
?>
I've tried to override the links__system_main_menu function with my own on template.php but still no luck.
Thanks for helping.
Regards,
@andriansandi