• Resolved nolimit966

    (@nolimit966)


    Hi there,
    I have been following a tutorial to add navigation bars to my WordPress site which I am developing, but i seem to be having trouble translating it to my own site.

    In my current header.php code i have the following code for y Main menu navigation bar:

    <div id="headercontainer">
      <div id="mainheadContainer">
        <div id="logoContainer">
          <img src="images/_0006s_Layer-12.png"/>
          <img src="images/fgfgf-.png" style="padding-left:10px;"/>
          <img src="images/_0001s_0000s.png" width="185" height="17"/>
          <img src="images/_0001s_0000s_logo-line.png" width="186" height="6"/>
        </div>
    
        <div id="menuwrap">
          <ul id="menu">
            <li id="home" class="active"><a href="www.dododl.com"><img src="images/products.png" class="center" />
              <p class="menu-text">Our Products</p>
              <span>Meet the product</span></a>
    
            </li>
            <li id="articles"><a href="#">
              <img src="images/_0001s_0001s_0001s_icon.png" class="center"/>
              <p class="menu-text">Explore</p>
              <span>Tours & Stories</span></a>
    
            </li>
    
            <li id="services"><a href="#"><img src="images/_0001s_0001s_0000s_Shape-1477.png" class="center"/>
              <p class="menu-text">Help</p>
              <span>Find out more</span></a>
            </li>
    
            <li id="about"><a href="#"><img src="images/_0001s_0001s_0003s_icon.png" class="center"/>
              <p class="menu-text">About us</p>
              <span>Forums and more</span>
              </a>
            </li>
    
            <li id="about"><a href="#"><img src="images/_0001s_0001s_0004s_Shape-1476.png" class="center"/>
              <p class="menu-text">Community</p>
              <span>Forums and more</span></a>
            </li>
    
          </ul>
        </div>
      </div>
    </div>

    I have opened my functions.php and added:

    <?php
    
    function register_nav_menus() {
      register_nav_menus(
        array(
          'header-menu' => __( 'Header Menu' ),
          'Sub-menu-homepage' => __( 'Extra Menu' )
        )
      );
    }
    add_action( 'init', 'register_my_menus' );

    and lastly added the following to my header.php

    <?php wp_nav_menu( array(‘menu’ => ‘Header Menu’ )); ?>

    and it seems to work fine, but im completely unsure how to complete the rest of the code so that the menu fits perfectly into each li id tag within my html.

    Any hep would be really appreciated with this.

    Thank you ??

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add a navigation bar to my current HTML in header’ is closed to new replies.