WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Make header image link to another page (7 posts)

  1. bigchezmktg
    Member
    Posted 4 years ago #

    I'm trying to help a friend. She wants the header image (the white one with her logo in it) to link to her home page.

    The wordpress site in question is: http://www.blog.kiwicreative.net

    I've googled all over the place and the options I'm getting seem convoluted.

    Is there an easy way to do this?

    Thanks in advance so much!

  2. annedorko
    Member
    Posted 4 years ago #

    <div id="topheader">
    <div id="ftp">[...]</div>
    <div id="logo">
    <a href="http://linktositehere.com"></a>
    </div>
    <div id="nav">[...]</div>
    </div>

    You'll need to throw in something like the above - a new div with a link. Style it using CSS... the dimensions of the following are wrong but you can measure it to be what you need and tweak it to place it correctly:

    #logo a {
        display: block;
        height: 150px;
        width: 300px;
        float: left;
    }

    This may not be semantic but should work.

  3. spamboy11
    Member
    Posted 4 years ago #

    In your theme's style.css file, replace:

    <div id="header">

    With:

    <div id="header" class="fix" onclick="location.href='http://www.Any_URL_here.com';" style="cursor: pointer;">

  4. spamboy11
    Member
    Posted 4 years ago #

    The entire header including image will become the link. Sometimes this can be a good solution....just looked at the site, it should be fine.

  5. spamboy11
    Member
    Posted 4 years ago #

    Sorry, leave out the 'class="fix"', that's just from my site... :)

  6. richardpd
    Member
    Posted 4 years ago #

    Hi bigchezmtkg

    Just replying to your message on my post about custom header image issue. I have to say I am new to WordPress & it has taken me a little while to get the right coding to add my image header (in place of header text) and get it clickable. I sorted the clickable bit with code in my header.php so I guess you need to edit that to get yours clickable as a link to the relevant homepage.

    Here is the relevant part of my header.php code that makes the image clickable. If you do something similar in your header.php you should get it working!

    <div id="header">
        <a href="<?php bloginfo('url'); ?>">
      <img src="http://learningthepianohelpsite.com/wp-content/uploads/2010/04/learningthepianohelpsite.jpeg" alt="<?php bloginfo('name'); ?>" />
        </a>
       <br /><br /><br /><br />
    	<p class="description">
    <?php bloginfo('description'); ?></p>
    </div><!--end header-->

    I hope this helps you (if it does or doesn't(!?) I would appreciate your feedback!). Goodluck and best wishes

  7. bigchezmktg
    Member
    Posted 4 years ago #

    I wound up using the code Anne sent. I had to tweak it a bit (the two headers are separate pix - not my code, btw) but once I adjusted the height, I was good to go!

    Thanks so much everyone! I really appreciate all your help!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags