WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Add span tags to menu (2 posts)

  1. Krallebabz
    Member
    Posted 3 years ago #

    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

  2. Krallebabz
    Member
    Posted 3 years ago #

    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>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags