Footer Menu has no Id
-
Hey guys,
I am using the following scripts to generate a footer navigation:
<?php wp_nav_menu( array( 'theme_location' => 'nav_menu', 'depth' => 1, 'menu_id' => 'main-nav', 'menu_class' => 'footer-menu', ) ); ?>Everything works expect that my first footer link (which is home) has no id and thus makes it very difficult to even style in uniquely. My html code is as follows –
<div class="footer-menu"> <ul> <li class="current_page_item"> <a title="Home" href="http://excelprint/">Home</a> </li> <li class="page_item page-item-5"> <li class="page_item page-item-8"> <li class="page_item page-item-10"> <li class="page_item page-item-12"> </ul> </div>All the menu links are coloured differenty. The home page also need to be coloured differently. At the moment it overwrites my default header menu, is there a way around this?
-
At the moment it overwrites my default header menu, is there a way around this?
What do you mean by this?
Okay, ignore that please (long day). Is there a way to get an id on to the home menu?
Try setting up a new Custom Menu:
http://codex.wordpress.org/Appearance_Menus_ScreenThen referring to that menu in your footer: http://codex.wordpress.org/Function_Reference/wp_nav_menu#Targeting_a_specific_Menu
Thanks Andrew… You’re a LEGEND!
That was really easy… 🙂
The topic ‘Footer Menu has no Id’ is closed to new replies.