Title: Menu function
Last modified: August 20, 2016

---

# Menu function

 *  [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * (@milmor)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/menu-function/)
 * Hello every1 🙂
 * The menu i will talk about is the one under images at [http://www.comunesampe.altervista.org/](http://comunesampe.altervista.org)
   
   I’ve created this menu by myself and i’d like to have it automatic with items
   in the WordPress Menu called “**Menù**“
 * The default usage is now:
 *     ```
       <ul id="topnav">
           <li><a href="URL">TITLE</a></li> <strong>(Single Item)</strong>
           <li>
               <a href="URL">TITLE</a> <strong>(Item with sub-items)</strong>
               <span>
                   <a href="URL">TITLE</a>
                   <a href="URL">TITLE</a>
                   <a href="URL">TITLE</a>
               </span>
           </li>
           <li><a href="URL">TITLE</a></li> <strong>(Single Item)</strong>
       </ul>
       ```
   
 * Here the css used:
 *     ```
       ul#topnav {
       	margin: 0; padding: 0;
       	float: left;
       	width: 100%;
       	list-style: none;
       	position: relative;
       	font-size: 16px;
       	background: url(http://newwpthemes.com/livedemo/wp-content/themes/goBusiness/images/nav-hover.png) repeat-x;
       	font-family: Tahoma;
       }
       ul#topnav li {
       	float: left;
       	margin: 0; padding: 0;
       }
       ul#topnav li a {
       	padding: 10px 15px;
       	display: block;
       	color: #ffffff;
       	font-style:uppercase;
       	font-weight: bold;
       	text-decoration: none;
       }
   
       ul#topnav li:hover {
       	color: #000000;
       }
   
       ul#topnav li span {
       	float: left;
       	padding: 5px 0;
       	position: absolute;
       	left: 0; top:30px;
       	display: none;
       	width: 100%;
       	font-size: 12px;
       	background: #ffffff;
       	color: #fff;
       	border: solid #e0e0e0 2px;
       	z-index:999999999999999;
       }
       ul#topnav li:hover span { display: block; }
       ul#topnav li span a {
       	color: #000066;
       	display: inline;
       }
       ul#topnav li span a:hover {text-decoration: underline;}
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/menu-function/#post-2361852)
 * [http://codex.wordpress.org/Function_Reference/wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu)
 *  Thread Starter [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * (@milmor)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/menu-function/#post-2361863)
 * Could someone help me with the usage??
 *     ```
       <?php $defaults = array(
         'theme_location'  => ,
         'menu'            => ,
         'container'       => 'div',
         'container_class' => 'menu-{menu slug}-container',
         'container_id'    => ,
         'menu_class'      => 'menu',
         'menu_id'         => ,
         'echo'            => true,
         'fallback_cb'     => 'wp_page_menu',
         'before'          => ,
         'after'           => ,
         'link_before'     => ,
         'link_after'      => ,
         'items_wrap'      => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',
         'depth'           => 0,
         'walker'          => );
       ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Menu function’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/menu-function/#post-2361863)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
