WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [theme: twentytwelve] replaced title with image - code to click home? (5 posts)

  1. dgissen
    Member
    Posted 1 year ago #

    hi I followed this thread to learn how to replace the title with an image. But now I'd like to make that image a hyper-link that always returns to the home page. I'm working on a locally hosted site so I can't send a link. Thanks!

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    Have you made it a hyperlink already?

  3. dgissen
    Member
    Posted 1 year ago #

    No; I can't seem to figure i out.
    I inserted this bit in the header.php of my child theme:

    <img class="site-logo" src="<?php echo get_stylesheet_directory_uri(); ?>/images/site-logo.png" alt="site logo" />

    I'm too much of a noob to figure out where to put the href = "..." bit.

  4. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    Try this;

    <a href="/">
     <img class="site-logo" src="<?php echo get_stylesheet_directory_uri(); ?>/images/site-logo.png" alt="site logo" />
    </a>

    http://www.w3schools.com/html/html_links.asp

  5. dgissen
    Member
    Posted 1 year ago #

    Thanks! that worked perfectly!

Topic Closed

This topic has been closed to new replies.

About this Topic