Help adding elements to custom menu
-
Hello WP.C. i’m trying to style my menu in my BlankSlate theme, but my html was written as below, and I want to interpret this into my WordPress header menu. I want to recreate the same structure including the “<i aria-hidden=”true” class=”icon-home”>” and “<span class=”icon”>”.
HTML:
<nav id="menu" class="fluid navigation nav"> <ul> <li> <a href="#"> <span class="icon"> <i aria-hidden="true" class="icon-home"></i> </span> <span>Home</span> </a> </li> <li>... </li> </ul> </nav>
Within my theme’s (BlankSlate) header it’s:
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
and render as:
<nav id="menu" class="fluid navigation nav"> <button id="menutoggle" class="navtoogle" aria-hidden="true" type="button"> … </button> <div class="menu-categories-container"> <ul id="menu-categories" class="menu"> <li id="menu-item-848" class="icon-home menu-item menu-item-type-taxonomy menu-item-object-category menu-item-848"> <a href="https://mysite.com/wordpress/category/post-formats/"> … </a>
I want to include icons styling using the html structure, please help.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Help adding elements to custom menu’ is closed to new replies.