WordPress.org

Forums

[Theme: Custom] Menu: adding classes to inner tag (1 post)

  1. Carlo
    Member
    Posted 10 months ago #

    Hi,

    Quick question:
    Does anyone know how to add classes to WordPress menu items?
    I know you can add classes to

  2. elements, but is there a way to add classes to the inner tag?

    Is this possible?

    <nav>
    
      <ul id="menu level1">
    
          <li class="current-menu-item"><a href="#" class="fa fa-home">item</a></li>
    
          <li class="has_submenu"><a href="#" class="fa fa-desktop">item</a>
              <ul class="submenu level2">
                <li><a href="#">submenu_item</a></li>
                <li><a href="#">submenu_item</a></li>
                <li><a href="#">submenu_item</a></li>
              </ul>
          </li>
    
          <li class="has_submenu"><a href="#" class="fa fa-pencil">item</a>
              <ul class="submenu level2">
                <li><a href="#">submenu_item</a></li>
                <li><a href="#">submenu_item</a></li>
                <li><a href="#">submenu_item</a></li>
              </ul>
          </li>
    
          <li><a href="#" class="fa fa-eye">item</a></li>
    
      </ul>				
    
    </nav>

    If this is possible, does anyone know how to do this?

    Simplefied HTML (removed title attributes etc.): CODEPEN (http://codepen.io/anon/pen/aCjvI?editors=100)

    Thanks in advance!

Reply

You must log in to post.

About this Topic

Tags