• Hi there,

    Do you know how I can change the title in the header to an image?

    Many thanks,

    Cassandra

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter cfaria

    (@cfaria)

    Actually, don’t worry I’m not using this theme anymore…

    I would like to know since I might use this theme.

    If you would like to use an image instead of the text you have to replace the following code in header.php:

    <div id="logo">
        <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
        <span id="blogDescription"><?php bloginfo('description'); ?></span>
    </div>

    with this:

    <div id="logo">
        <a href="<?php echo get_option('home'); ?>/"><img src="link to image" alt="" title="" /></a>
    </div>

    I thought the first set of speech marks were for the URL of the image and the speech marks after ‘title’ should be the Alt text for the image, but it didn’t work:

    <div id="logo">
        <a href="<?php echo get_option('home'); ?>/"><img src="link to image" alt="https://getloadsmorecustomers.co.uk/wp-content/uploads/2009/07/getloadsmorecustomers.png" title="getloadsmorecustomers" /></a>
    </div>

    just resulted in the URL being there instead of the logo.

    Please can someone give me the exact code?

    The url for the image is:
    https://getloadsmorecustomers.co.uk/wp-content/uploads/2009/07/getloadsmorecustomers.png

    and the Alt text is:
    getloadsmorecustomers

    and the title is:
    Get Loads More Customers

    Thanks

    src=”” is the source / path to your image (URL)
    alt=”” is the text displayed when the image isn’t available
    name=”” is the text displayed when you hover the image

    So this will work:

    <div id="logo">
        <a href="<?php echo get_option('home'); ?>/"><img src="https://getloadsmorecustomers.co.uk/wp-content/uploads/2009/07/getloadsmorecustomers.png" alt="Get Loads More Customers" title="Get Loads More Customers" /></a>
    </div>

    That was quick!

    I see where I went wrong; your original code was self explanatory. I got mixed up because I’m inexperienced with code.

    Thanks a lot.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Replace title in header with image’ is closed to new replies.