theme development - How to Modify a Widgets UL andor LI Classes

Im attempting to use twitter UL styles on a custom menu widget.For example, in BootStrap they have a Nav List Style for

Im attempting to use twitter UL styles on a custom menu widget.

For example, in BootStrap they have a Nav List Style for UL's

<ul class="nav nav-list">
    <li class="nav-header">List header</li>
    <li class="active"><a href="#">Home</a></li>
    <li><a href="#">Library</a></li>
    ...
</ul>

Which I am trying to integrate with a Custom Menu...

<div class="menu-footer_left-container">
    <ul id="menu-footer_left" class="menu"><!-- I need to add "nav nav-list" here! -->
        <li id="menu-item-100" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-100"><a href="">Home</a></li>
        <li id="menu-item-101" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-101"><a href="/about-us/">About Us</a></li>
        ...
    </ul>
</div>

What I'd like to be able to do is add the classes to the UL and LI's, but I'm stumped.

Please advise.

Im attempting to use twitter UL styles on a custom menu widget.

For example, in BootStrap they have a Nav List Style for UL's

<ul class="nav nav-list">
    <li class="nav-header">List header</li>
    <li class="active"><a href="#">Home</a></li>
    <li><a href="#">Library</a></li>
    ...
</ul>

Which I am trying to integrate with a Custom Menu...

<div class="menu-footer_left-container">
    <ul id="menu-footer_left" class="menu"><!-- I need to add "nav nav-list" here! -->
        <li id="menu-item-100" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-100"><a href="http://mysite.dev">Home</a></li>
        <li id="menu-item-101" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-101"><a href="http://mysite.dev/about-us/">About Us</a></li>
        ...
    </ul>
</div>

What I'd like to be able to do is add the classes to the UL and LI's, but I'm stumped.

Please advise.

Share Improve this question asked Aug 31, 2012 at 21:31 sleepersleeper 6232 gold badges12 silver badges26 bronze badges 1
  • So far, the only way I have found is to use jQuery to add classes. – sleeper Commented Aug 31, 2012 at 22:23
Add a comment  | 

1 Answer 1

Reset to default 2

you would have to do something like this

<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?> The container class you can change your class add more class

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745070779a4609532.html

相关推荐

  • theme development - How to Modify a Widgets UL andor LI Classes

    Im attempting to use twitter UL styles on a custom menu widget.For example, in BootStrap they have a Nav List Style for

    16小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信