Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

menu bar

menu bar

I am working on converting an HTML/CSS template to a WP theme on my local machine. I am unable to add vertical drop down sub-menus to the main menu in the theme. The HTML for the menu is:

<div class="navigation">

            <div id="menu">
        <ul>
          <li><a href="#">Home</a></li> 
           <li><a href="#">Eternal Sharing</a></li> 
         <li><a href="#">Eternal Resource</a></li>
         <li><a href="#">Event Calender</a></li>
            <li><a href="#">Gallery</a></li>
            <li><a href="#">FAQ</a></li>
            <li><a href="#">Blog</a></li>
            <li><a href="#">Eternal Shoppe</a></li>
        </ul>
    </div> 
</div>

My code in the functions.php is:

add_action( 'init', 'register_my_menus' );
function register_my_menus() {
    register_nav_menus(
        array(
            'menu-1' => __( 'Primary Menu' ),
        )
    );
}?>

The header.php code is :

        <div id="menu">
        <?php 
        wp_nav_menu( array( 'theme_location' => 'menu-1' ) ); 
        ?> 

I have also created the menu and sub menus from the dashboard and named the menu there as 'Main_Menu'. But still the submenu is not appearing as a vertical drop down. The same dashboard settings are working perfectly for the TwentyTwelve theme. Kindly advise me.

share|improve this question
    
What's in your style.css for your menus? That's going to be the main thing that determines how they appear on the page. –  sabreuse Sep 11 '13 at 19:19
    
Thank you for the reply. This is part of the style.css which I found relevant: #menu { clear: both; width: 985px; height: 45px; background:#dfceac; font:"Times New Roman"; margin:0 auto; display: block; /* not original / } #menu ul { padding: 13px 0 0 0; margin: 0 0 0 20px; list-style: none; display: block; / not original */ } #menu ul li{ display: inline; } #menu ul li a{ float: left; padding: 0 20px; font-size: 18px; text-align: center; text-decoration: none; color: #433224; font:"Times New Roman"; } #menu li a:hover, menu li .current{ color: #ad5003;} –  Debashis Sikdar Sep 13 '13 at 5:39
    
Hello @sabreuse. I apologize for the lack of formatting in my reply. Could not find a way out to do the formatting. Would highly appreciate if you could take the trouble of reading through the 'ugly' format and attempt to provide a solution to my question. Regards Debashis –  Debashis Sikdar Sep 13 '13 at 7:13
    
You first need to decide if this is a wordpress problem or a CSS problem. Is the HTML showing up? If yes and yet it's not visible, it's a CSS problem and posting it at this forum is kind of pointless. –  Bibhas Sep 13 '13 at 9:07
    
I have uploaded the image of the menu bar that I'm getting. I would like subFAQ1 and subFAQ2 to come as vertical drop-downs to the FAQ menu item. How do I achieve it? –  Debashis Sikdar Sep 13 '13 at 12:09

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.