WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried creating a dynamic menu from HTML, I registered menu in function name is main menu,

Here is the HTML code that display the main menu-

<div class="submenu">
    <div style="width:980px;">
        <a class="sprite" href="<?php echo esc_url( home_url( '/' ) ); ?>">&nbsp;</a> 
       <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> <img src="<?php bloginfo('template_directory') ?>/images/home.png" width="57" height="52"  class="home"/></a>

        <li><a href="#">Home</a>
                <li><a href="#">About Us</a></li>
                <li><a href="#">Privacy Policy</a></li>
                <li><a href="#">Disclaimer</a></li>
                <li><a href="#">SiteMap</a></li>
                <li><a href="#">Contact Us</a></li>
        <li><a href="#">Aquaponics</a></li>
        <li><a href="#">AquaCulture</a></li>
        <li><a href="#">Hydroponics</a></li>
        <li><a href="#">Do-It-Yourself Aquaponics</a></li>
        <li><a href="#">Fish & Plants for Aquaponics</a></li>
share|improve this question
What exactly is your question? How to use wp_nav_menu()? – toscho Jun 30 '13 at 8:35
What exactly are you trying to do? (PS. I don't think that placing <a> tags directly in <ul> is a good idea). – Krzysiek Dróżdż Jun 30 '13 at 9:02
You should read more about the walker class – JMau Jun 30 '13 at 12:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.