WordPress.org

Ready to get started?Download WordPress

Forums

How to use wp_nav_menu (7 posts)

  1. dogbot
    Member
    Posted 3 years ago #

    I'm using a dropdown menu script that requires certain classes on certain items of the list to work.
    basically the <a> of a list items <li> with a sub-menu should have class="dir"
    The </li>
    <li>'s of the first and last items should have classes "first" and "last" respectively.
    like so:

    <li><a href="./" class="dir">Lyrics</a>
                    <ul>
                        <li class="first"><a href="./">Search for Lyrics</a></li>
                        <li class="first"><a href="./">Play Lyrics Game</a></li>
                    </ul>

    Plesae dont tell me to change my css, use a plugin,jquery,etc...I just need that output that way that's all.

    Thank you so much

  2. dogbot
    Member
    Posted 3 years ago #

    maybe I posted int the wrong sub-forum? could an admin move it to a more appropriate one?

    thank you.

  3. chinmoy
    Member
    Posted 3 years ago #

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

    http://codex.wordpress.org/Function_Reference/wp_nav_menu

  4. dogbot
    Member
    Posted 3 years ago #

    My post was jumbled by the editor, here it is again

    I'm using a dropdown menu script that requires certain classes on certain items of the list to work.
    basically the <a> tag of a list item
    "

  5. " with a sub-menu should have class="dir"
    The "
  6. " tags's of the first and last items should have classes "first" and "last" respectively.
    like so:
  7. <a>
    <li><a href="./">class="dir">Lyrics</a>
    <ul>
                        <li class="<strong>first</strong>"><a href="./">Search for Lyrics</a></ul>
    </li>
    
                        <li class="<strong>last</strong>"></a><a href="./">Play Lyrics Game</a>

    <p>Plesae dont tell me to change my css, use a plugin,jquery,etc...I just need that output that way that's all. </p>
    <p>Thank you so much

  • dogbot
    Member
    Posted 3 years ago #

    I'm using a dropdown menu script that requires certain classes on certain items of the list to work.

    basically the [a] tag of a list item with nested list should have class="dir"
    The [li] tag of the first and last items in nested list should have classes "first" and "last" respectively.

    like so:

  • Lyrics

  • <li class="last">Play Lyrics Game

    Plesae dont tell me to change my css, use a plugin, jquery,etc...I just need that output that way that's all.

    Thank you so much

  • dogbot
    Member
    Posted 3 years ago #

    I'm using a dropdown menu script that requires certain classes on certain items of the list to work.

    basically the [a] tag of a list item with nested list should have class="dir"
    The [li] tag of the first and last items in nested list should have classes "first" and "last" respectively.

    like so:

    <li><a href="./" class="dir">Lyrics</a>
                    <ul>
                        <li class="first"><a href="./">Search for Lyrics</a></li>
                        <li class="last"><a href="./">Play Lyrics Game</a></li>
                    </ul>

    Plesae dont tell me to change my css, use a plugin, jquery,etc...I just need that output that way that's all.

    Thank you so much

  • dogbot
    Member
    Posted 3 years ago #

    sorry for all of the crazy posts..this forum's text editor is unforgiving to say the least

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags