I am trying to show this menu in wordpress using wp_nav_menu(); but due to less knowledge i can’t understand how to do this task.
kindly help me and please share code if you have any idea.
<div class="pull-left">
<nav>
<ul class="sf-menu sf-js-enabled sf-shadow l_tinynav1" id="nav">
<li class="first-level-li"> <a href="<?php bloginfo('url'); ?>" class="first-level-link sf-with-ul">
<div class="menu-icon"><i class="icon-home icon-large"></i></div>
<div class="menu-item-wrapper">
<div class="first-level-li-text-link">Home</div>
</div>
</a> </li>
<li class="first-level-li"> <a href="<?php bloginfo('url'); ?>/?page_id=4" class="first-level-link">
<div class="menu-icon"><i class="icon-user icon-large"></i></div>
<div class="menu-item-wrapper">
<div class="first-level-li-text-link">About Us</div>
</div>
</a> </li>
<li class="first-level-li"> <a href="<?php bloginfo('url'); ?>/?page_id=6" class="first-level-link">
<div class="menu-icon"><i class="icon-cogs icon-large"></i></div>
<div class="menu-item-wrapper">
<div class="first-level-li-text-link">Services</div>
</div>
</a> </li>
<li class="first-level-li"> <a href="<?php bloginfo('url'); ?>/?page_id=8" class="first-level-link">
<div class="menu-icon"><i class="icon-briefcase icon-large"></i></div>
<div class="menu-item-wrapper">
<div class="first-level-li-text-link">Projects</div>
</div>
</a> </li>
<li class="first-level-li"> <a href="<?php bloginfo('url'); ?>/?page_id=10" class="first-level-link">
<div class="menu-icon"><i class="icon-key icon-large"></i></div>
<div class="menu-item-wrapper">
<div class="first-level-li-text-link">Careers</div>
</div>
</a> </li>
<li class="first-level-li"> <a href="<?php bloginfo('url'); ?>/?page_id=12" class="first-level-link">
<div class="menu-icon"><i class="icon-comments icon-large"></i></div>
<div class="menu-item-wrapper">
<div class="first-level-li-text-link">FAQ</div>
</div>
</a> </li>
<li class="first-level-li"> <a href="<?php bloginfo('url'); ?>/?page_id=14" class="first-level-link">
<div class="menu-icon"><i class="icon-envelope-alt icon-large"></i></div>
<div class="menu-item-wrapper">
<div class="first-level-li-text-link">Contact</div>
</div>
</a> </li>
</ul>
</nav>
</div>
now i am using this but its static and one more thing i am also facing active menu issue too. please share code with me or telme how can i add active class in static menu which one is clicked so show this is your position now.
This process is simple nowadays.
Goto your wordpress dashboard then select appearance->editor
and select your theme header.php file.
add this line in the header section:
after adding the above line go to appearance->menu then add the Fa Icon codes beside you menu items
hope this help
active class added using custom code.
Assuming you are using the markup above, you can simply change the
icon-key icon-large
classes to reflect those of FontAwesome.For example, the ‘home’ icon, which is represented with a house. So, simply replace
icon-home icon-large
withfa fa-home
.A list of the FontAwesome icons are available here, click one to see it’s class.
If you wish to use a dynamic menu then
wp_nav_menu
is probably not for you. You may find it easier to build your own using wp_get_nav_menu_items. There is a brilliant example on that link of exactly how to do it.