• I’m suuuure this is a breeze for those of you that are fluent in php!

    https://www.joaniemoore.com

    Home page header – the cute little kid with all the deer. If my site visitors hover the mouse over the header, I’d like it to be a clickable link to return to the home page…

    Perhaps my brain is on overload – it is just not coming to me on what I need to put in there, and where. Advice, please?

    And…. thanks for all the instructions upgrading to 2.8.4 the manual way – I expected a disaster but it went perfectly smooth. Yippie!

Viewing 8 replies - 1 through 8 (of 8 total)
  • There’s a few validation errors on that page you might want to look at.

    If you want to post your header.php file (put it all between backticks ` when you post it) in the mean time, I’m sure someone will take a looksy.

    Thread Starter Lizbit

    (@lizbit)

    Gary, is that you in disguise??? Always throwing the validation at me…. ruining my day…. ?? (just kidding)…. I’ll go into the code soon and try to clean that up. I’m pretty fussy about validation.

    I somehow got it set so if you click on the header it goes back to the home page, but – if you hold the mouse over it, it doesn’t show as a clickable link. I wonder why this is?

    Thanks for the help, alism!

    Heh, I’ve been called a lot of things in my life, but I don’t ever remember being called Gary.

    I’m not getting any kinda clickable link (using Google Chrome). I suspect you’ve just got an href inside a div, instead of around it or something. Looks like there’s an href not closed properly too somewhere in the mix.

    Like I say, post your header.php if you want, but get it validating… *nag nag nag*

    Cheers,
    Gary, err I mean alism.

    Thread Starter Lizbit

    (@lizbit)

    **GARY** tsk tsk – haha

    here tis! you can see I dropped in a link to my site in a few places – but obviously incorrectly….

    CORRECTION – my previous code was incorrect. Here it is:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="https://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title><?php if (is_home () ) { bloginfo('name'); } elseif ( is_category() ) { single_cat_title(); echo ' - ' ; bloginfo('name'); }
     elseif (is_single() ) { single_post_title(); }
     elseif (is_page() ) { bloginfo('name'); echo ' '; single_post_title(); }
     else { wp_title('',true); } ?></title>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <!--[if IE 6]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie6.css" type="text/css" media="screen" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie7.css" type="text/css" media="screen" /><![endif]-->
    <link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed', 'kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed', 'kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_head(); ?>
    </head>
    <body>
        <div id="art-page-background-gradient"></div>
    <div id="art-main">
    <div class="art-Sheet">
        <div class="art-Sheet-tl"></div>
        <div class="art-Sheet-tr"></div>
        <div class="art-Sheet-bl"></div>
        <div class="art-Sheet-br"></div>
        <div class="art-Sheet-tc"></div>
        <div class="art-Sheet-bc"></div>
        <div class="art-Sheet-cl"></div>
        <div class="art-Sheet-cr"></div>
        <div class="art-Sheet-cc"></div>
        <div class="art-Sheet-body">
    <div class="art-Header"> <a href="https://www.joaniemoore.com">
        <div class="art-Header-png"></div>
        <div class="art-Header-jpeg"><a href="https://www.joaniemoore.com">
            <?php bloginfo('name'); ?>
            </a></div>
    <div class="art-Logo">
        <h1 id="name-text" class="art-Logo-name">
            <a href="https://www.joaniemoore.com">
            <?php bloginfo('name'); ?>
            </a></h1>
      <div id="slogan-text" class="art-Logo-text">
            <a href="https://www.joaniemoore.com">
            <?php bloginfo('description'); ?>
            </a></div>
    </div>
    
    </div>

    Ok, I’ll just edit a snippet of that, try something like this:

    <div class="art-Sheet-body">
        <div class="art-Header">
        <div class="art-Header-png"></div>
        <a href="<?php bloginfo('url'); ?>">
        <div class="art-Header-jpeg">
            <?php bloginfo('name'); ?>
        </div>
        </a>
    <div class="art-Logo">

    Thread Starter Lizbit

    (@lizbit)

    vunder-ful! graci!
    Thanks…. gary! ?? I’ll work on the validation.

    Heh, no worries. ??

    Gazza.

    I do this in my code for a clickable banner:

    <div id="banner" onclick="window.location.href='https://yourdomain.com/'" style="cursor: pointer;"></div>

    Of course put in your own domain root obviously. ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Link to home page from header image’ is closed to new replies.