NEW HEADER IMAGE DOESN'T HYPERLINK TO HOME PAGE

Viewing 6 posts - 1 through 6 (of 6 total)
  • #6277
    bazagraphics
    Participant

    Could someone please let me know how to add a hyperlink to the header file that i’ve added. with the wording only, it has a hyperlink to the home page but as soon as you replace it with an image, the hyperlink disappears.
    thanks in advance
    Donna

    http://www.bazagraphics.com.au

    #6290
    Daniel Tara
    Keymaster

    Please see this topic.

    #6300
    bazagraphics
    Participant

    Hi Daniel
    sorry for my ignorance… but i don’t know coding….is there anywhere that can give the code so i can add it using the editor.

    #6307
    Daniel Tara
    Keymaster

    This is not an easy task. It is planned to be implemented in the next version by default like this because it is a popular request. If you have the patience until then you’ll get it otherwise you’ll have to hack the code.

    #6316
    bazagraphics
    Participant

    πŸ™ .. no worries, will go back to text only then
    thank you πŸ™‚

    #6318
    gavintfn
    Participant

    yeah, sure…but it takes a couple steps… I am assuming you know how to use appearance > editor in the main dashboard..so If you don’t understand what something means…just let me know…

    ok, in header.php i created a div around the header so to speak…
    so where you see this:

    <header id=”header” role=”banner”>
    <?php $heading_tag = ( is_home() || is_front_page() ) ? ‘h1’ : ‘div’; ?>
    <<?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; ?>>
    </header>

    Replace with this:

    <header id=”header” role=”banner”>
    <div id=”centerheader”>
    <?php $heading_tag = ( is_home() || is_front_page() ) ? ‘h1’ : ‘div’; ?>
    <a href=” http://yoursite.com/ “><img src=”http://yoursite.com/yourjpg location” height=”100px” width=”940px” style=”max-width:940px; margin:0 auto;”></img></a>
    </div>
    </header>

    ________________________________________
    Second Part…

    in style.css add to bottom, (once again, in the appearance > editor area..should be all the way at the bottom on the right…)

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

    Start there, lets see it…

    • This reply was modified 12 years, 3 months ago by gavintfn.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.