• I need to integrate my blog with my website. How do I replace the header + nav with my own code?

    I see the header.php file but have no idea where to put my code. Or if there are other files to change.

    THANKS

Viewing 11 replies - 1 through 11 (of 11 total)
  • <div id="access" role="navigation">
    			  <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    				<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
    				<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
    				<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    			</div><!-- #access -->

    Your blog manu is coming from this function <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>

    You only change the code and design here.

    Thread Starter puglet

    (@puglet)

    Thanks for the fast reply! So, just to be clear since I’m a noob – if my header is:

    <div id="nav_"><img id="nav" src="/images/2.png" width="300" height="155" alt="" /></div>
    
    <div id="navcontainer">
    <ul id="menu" class="orange">
    <li><a href="index.html">Home</a></li>
    <li><a href="gallery.html">Gallery</a></li>
    <li><a href="services.html">Rates & Services</a></li>
    <li><a href="about.html">About/Contact</a></li>
    <li><a href="faq.html">FAQ</a></li></ul>
    </div>

    Then i just paste that where?

    Sorry – I’m trying but am a little over my head ??

    goto line no 73 in header.php file and remove <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>. In that position you will put this code.

    <?php //wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    <div id="nav_"><img id="nav" src="/images/2.png" width="300" height="155" alt="" /></div>
    
    <div class="menu">
    <ul><li><a href="index.html">Home</a></li>
    <li><a href="gallery.html">Gallery</a></li>
    <li><a href="services.html">Rates & Services</a></li>
    <li><a href="about.html">About/Contact</a></li>
    <li><a href="faq.html">FAQ</a></li>
    </ul>
    </div>
    Thread Starter puglet

    (@puglet)

    AWESOME!

    thanks ??

    You’re welcome.:)

    Thanks
    Chinmoy

    NOTE: if solve, plz mark it as resolved.

    Thread Starter puglet

    (@puglet)

    Ok, it didn’t work.

    My nav is styled with info from an external stylesheet. That info clearly isn’t making it. Still trying to find where the images are located.

    looks like: https://frolicblog.com/

    needs to look like this (the green part): https://frolicphoto.com/dailyfrolic/

    Thread Starter puglet

    (@puglet)

    this is the code — i can’t find where to call out the style sheet :9

    <?php //wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    
    <div id="header" style="width:989px">
    <div id="Table_01" style="height:250px;background-color:#52422D;">
    	<div id="id1_"><img id="id1" src="/images/1.png" width="989" height="20" alt="" /></div>
    	<div id="id2_"><img id="id2" src="/images/2.png" width="300" height="155" alt="" /></div>
    	<div id="id3_"><img id="id3" src="/images/3.gif" width="689" height="104" alt="" /></div>
    	<div id="id4_"><img id="id4" src="/images/4.png" width="689" height="15" alt="" /></div>
    	<div id="id5_"></div>
        	<div id="navcontainer">
    <ul id="menu" class="orange">
    	 <li><a href="index.html">Home</a></li>
    	 <li><a href="gallery.html">Gallery</a></li>
             <li><a href="services.html">Rates & Services</a></li>
             <li><a href="about.html">About/Contact</a></li>
    	 <li class="active"><a href="xxx.html">Blog</a></li>
    	 <li><a href="faq.html">FAQ</a></li></ul></div>
    </div>

    use bloginfo(“template_directory”) for getting the image.
    eg.
    <img id="id1" src="<?php bloginfo("template_directory")?>/images/1.png" width="989" height="20" alt="" />

    Thread Starter puglet

    (@puglet)

    thanks – but what directory do i need to put the images in for that to work?

    any idea on how to call out the stylesheet?

    right now, things are looking about 0% closer to what they should ??

    THANKS!!

    <?php bloginfo(“template_directory”)?> this WP functions. Not needed any directory name. just replace the code with above code.

    <img id="id1" src="/images/1.png" width="989" height="20" alt="" /> shuld be

    <img id="id1" src="<?php bloginfo("template_directory")?>/images/1.png" width="989" height="20" alt="" />

    Thread Starter puglet

    (@puglet)

    yeah – i did that. but my images aren in a folder in the root directory of my hosting account. not anywhere near the WP directory. am thinking this is why it’s not working but don’t know how to fix?

    and without the style sheet, it’s all just broken ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Using a custom header nav in Twenty Ten’ is closed to new replies.