Creating a Menu, How to put "li" inside "a" ?
-
Good afternoon community!
I made a wordpress theme and have a little doubt.
I created a menu with the following structure:<nav class="nav-global-cont"> <ul id="menu-menu-1" class="nav-global"> <li> <a> Item 1 </a> </ li> <li> <a> Item 2 </a> </ li> <li> <a> Item 3 </a> </ li> <li> <a> Item 4 </a> </ li> </ ul> </ nav>
For this, I used the following code within my header.php
<? php wp_nav_menu (array ( 'menu' => 'Primary Nav' 'container' => 'nav' 'menu_class' => 'nav-global', 'container_class' => 'nav-global-cont' 'depth' => '2' )); ?>
I would like to do otherwise, because the elements “li” contains images of buttons and I desire that all buttons are fully converted into links, not just the text. How do I get the “li” tags to be within the “a”? I wnat to do something like this:
<nav class = "nav-global-cont"> <ul id = "menu-menu-1" class = "nav-global"> <a> <li> Item 1 </ li> </a> <a> <li> Item 2 </ li> </a> <a> <li> Item 3 </ li> </a> <a> <li> Item 4 </ li> </a> </ ul> </ nav>
Thank U!
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Creating a Menu, How to put "li" inside "a" ?’ is closed to new replies.