WordPress.org

Ready to get started?Download WordPress

Forums

Replace title in header with image (7 posts)

  1. cfaria
    Member
    Posted 4 years ago #

    Hi there,

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

    Many thanks,

    Cassandra

  2. cfaria
    Member
    Posted 4 years ago #

    Actually, don't worry I'm not using this theme anymore...

  3. mubzee
    Member
    Posted 4 years ago #

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

  4. Arcance
    Member
    Posted 4 years ago #

    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>
  5. rustybulb
    Member
    Posted 4 years ago #

    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="http://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:
    http://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

  6. Arcance
    Member
    Posted 4 years ago #

    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="http://getloadsmorecustomers.co.uk/wp-content/uploads/2009/07/getloadsmorecustomers.png" alt="Get Loads More Customers" title="Get Loads More Customers" /></a>
    </div>
  7. rustybulb
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags