Support » Fixing WordPress » Add span tags to menu

  • Resolved Krallebabz

    (@krallebabz)


    Hello!

    I would like to put span tags on my menu, and I’d like to know how I add them in my current version of WordPress.

    <ul id="topmenu">
    				<li><a href="#"><span>Home</span></a></li>
    				<li><a href="#"><span>Item</span></a></li>
    				<li><a href="#"><span>Item</span></a></li>
    			</ul>

    For now I’ve come this far as for the static “Home”-button:

    <ul id="topmenu">
    				<li><a href="<?php bloginfo('url'); ?>" title="Home"><span>Home</span></a></li>
    </ul>

    … but I don’t know how to add the rest of my pages (which I’m using as the menu-items) to the menu.

    A quick question as well: How do I add the “menu”-functionality to my theme, so it’s easier for me to arrange the different menu- and submenu-items?

    I’m very new to WordPress, and I really appreciate som help on this.

    Thanks in advance,
    Kralle

Viewing 1 replies (of 1 total)
  • Right, so I finally found a thread which could help me. Here’s the code I used. 🙂

    <ul id="topmenu">
    	<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header', 'theme_location' => 'primary', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    </ul>
Viewing 1 replies (of 1 total)
  • The topic ‘Add span tags to menu’ is closed to new replies.