WordPress.org

Ready to get started?Download WordPress

Ideas

add nav menu level class/identifier

  1. benzir
    Member

    WordPress getting more popular day by day. Every can use WP for it's flexibility.

    In wordpress should be add Navigation menu level class/identifier. I din't find it WP 3.5.1 and older version. It's very important for style differently for each level. I know it's possible by CSS selector but it's not easy thing. Everyone not expert in CSS. Navigation Menu live class/identifier can be like below:

    <ul>
      <li class="level-1"><a href="">Level 1</a>
        <ul class="level-1">
          <li class="level-2"><a href="">Level 2</a>
            <ul class="level-2">
              <li class="level-3"><a href="">Level 3</a>
              	<ul class="level-3">
                  <li class="level-4"><a href="">Level 4</a>
                </ul>

    Hope WP team will consider this feature.
    Thanks for advance.

    Posted: 1 year ago #
  2. crstauf
    Member

    12345

    there's nothing expert about the CSS... quite simple:

    ul.menu > li > ul.sub-menu > li > ul.sub-menu > li {
       style for third level li here;
    }

    if you're authoring a theme, you should follow that syntax and not do ul.level-3 li as that style will be applied to a fourth level li, which means you know the > sign anyway.

    Posted: 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    2 Votes
  • Status

    Sorry, not right now