Header lost its "home" link

Viewing 7 posts - 1 through 7 (of 7 total)
  • #5885

    I replaced the header title text with a graphic and now when I try to click on the header to take me back to the main page of the site, nothing happens. The link to “home” is no longer there. How can i fix this?

    http://www.vickismithartist.com

    #5888
    gavintfn
    Participant

    well, id do a couple things…

    first, to get you image to work only…

    go to style.css look for #wrapper img and change max length to 940px.
    then, go to header.php… find this line…

    `<<?php echo $heading_tag; ?> id=”site-title”><a href=”<?php echo home_url(); ?>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></a></<?php echo $heading_tag; ?>>`

    and replace it with this line…

    `<<?php echo $heading_tag; ?> id=”site-title”><a href=”<?php echo home_url(); ?>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><img src=”http://vickismithartist.com/compositions/wp-content/uploads/2012/07/momtitle2.gif&#8221; height=”100px” width=”940px” scale=”0″><?php bloginfo( ‘name’ ); ?></a></<?php echo $heading_tag; ?>>`

    however, i think you moved the navigation to the header, and i think thaf it would look better aligned to the tight, vertically centered… I have a mess aaround site that i did this on… its http://www.yellowrootllc.com/site2

    if you like this, let me know, ill post the mods…

    • This reply was modified 12 years, 5 months ago by gavintfn. Reason: fixed code in forum
    #5890
    Daniel Tara
    Keymaster
    #5891

    I’ll check out the post, thanks Daniel.

    And yes, Gavin, I do like what you did with that. will you post the mods please? thanks so much!

    #5893
    gavintfn
    Participant

    no prob…
    Im guessing you already added
    wp_nav_menu( array( ‘theme_location’ => ‘primary_nav’, ‘container_id’ => ‘primary-nav’, ‘container_class’ => ‘nav’, ‘fallback_cb’ => ‘minimatica_nav_menu’ ) ); to the header.php file,
    I assume that how you got your nav at the top… if not, let me know what you did, and I will ammend…

    However, once that is in the header, its really just a matter of changing the css..

    so for your site,
    you want to make a new image, make it a png, 237px wide by 108px tall…
    load it up to your site, write down the url..

    in appearance > editor.. header.php..you gonna paste this

    staring after the `<header id=”banner” role=”banner”>`

    `<div id="centerheader"<
    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    <a href="http://vickismithartist.com/" ><img src="http://vickismithartist.com/yourlogoimage.png" style="margin-top:-10px;"></img></a>

    <nav id="access" role="navigation" style="float:right; margin-top:35px; margin-top:50px; width:610px; margin-right:5px;">
    <?php wp_nav_menu( array( 'theme_location' =< 'primary_nav', 'container_id' => 'primary-nav', 'container_class' => 'nav', 'fallback_cb' => 'minimatica_nav_menu' ) ); ?>
    </nav></div>`

    in total it should look like this:

    `<body <?php body_class(); ?>>
    <div id="wrapper" class="hfeed">
    <header id="header" role="banner">
    <div id="centerheader">
    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    <div style="width:240px; height:auto; float:left;"><a href="http://vickismithartist.com/" ><img src="http://vickismithartist.com/yourlogoimage.png" style="margin-top:-10px;"></img<>/a></div>

    <nav id="access" role="navigation" style="float:right; width:610px; margin-right:5px;">
    <?php wp_nav_menu( array( 'theme_location' =< 'primary_nav', 'container_id' => 'primary-nav', 'container_class' => 'nav', 'fallback_cb' => 'minimatica_nav_menu' ) ); ?>
    </nav>
    </div>
    </header>`

    that code will replace what you had… make sure to fill in the url of you logo image..

    then your going to go to to style.css, in appearnce>editor

    go to the bottom and add:

    #centerheader {
    margin:0 auto;
    width:940px;
    height:auto;
    }

    next hit ctrl + f and look for :

    .nav

    replace with:

    .nav {
    width: 600px;
    height: 24px;
    margin: 0 auto;
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 24px;
    margin-top: 35px;

    next:

    .nav ul..

    change it to

    .nav ul {
    position: relative;
    z-index: 597;
    float: right;
    top: auto !important;
    list-style: none;
    margin: -5px 0;
    }

    Next look for
    .nav ul li

    change it to:

    .nav ul li {
    float: left;
    height: 34px;
    margin: 0;
    margin-right: 15px;
    margin-left: 15px;
    vertical-align: middle;
    text-transform: uppercase;
    }

    next…

    .nav ul li a

    change to
    .nav ul li a {
    display: inline-block;
    padding: 5px 0;
    color: #555;
    text-decoration: none;
    font-weight: bold;
    }

    hopefully thats all of it… heres a alias for my email, if its not looking right, it should just be a matter of messing with the css…if its a little too dificult for you, send me an email, and i will fix , but i think that should be right,…..

    • This reply was modified 12 years, 5 months ago by gavintfn.
    • This reply was modified 12 years, 5 months ago by gavintfn.
    • This reply was modified 12 years, 5 months ago by gavintfn. Reason: Daniel...I really need to know how to post code effectively... right now i have to changfe all of the less than and greater than symbols to their HTML code.. like " & g t ; " its killin me man..lol
    #5897

    Gavin, thanks for the code. I corrected a couple of fat-finger slips (mostly reversed “>”), but it’s working. I need to contact the client and see what she says, but it certainly does make better use of the header and top end. Again, thanks for the dilligence in getting that to me. I appreciate it.

    #5902
    gavintfn
    Participant

    yeah..lol..thanks for the fix.. it was late.. and I had to convert all of the Gt and LT symbols to html character code…

    site looks good though!!!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.