Support » Fixing WordPress » Hyperlinking custom header image…

  • I am using a custom header image with the default WordPress text turned off. In which templates would I have to add a link code and around what in the templates so that it is easier for visitors to navigate back to the homepage from a comment or archive page. Thank you.

    http://www.gamerbabble.com

Viewing 9 replies - 1 through 9 (of 9 total)
  • just put this in your header.php

    <a href="/index"><img src="headerimg" border="0"></a>

    Thread Starter esko

    (@esko)

    thanks…..any special place it needs to go or just anywhere in that template?

    just where it is now

    Thread Starter esko

    (@esko)

    doesnt seem to be working wherever i put it.

    Thread Starter esko

    (@esko)

    This is the current template header.php
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <style type="text/css" media="screen">
    /* To accomodate differing install paths of WordPress, images are referred only here,
    and not in the wp-layout.css file. If you prefer to use only CSS for colors and what
    not, then go right ahead and delete the following lines, and the image files. */

    body { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/bgcolor.png"); }
    <?php /* Checks to see whether it needs a sidebar or not */ if ((! $withcomments) && (! is_single())) { ?>
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/background.png") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/cbackground.png") repeat-y top; border: none; }
    <?php } ?>
    #header { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/header.png") no-repeat top left; }
    #footer { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/footer.png") no-repeat bottom; }

    /* Because the template is slightly different, size-wise, with images, this needs to be set here
    If you don't want to use the template's images, you can also delete the following two lines. */

    /* To ease the insertion of a personal header image, I have done it in such a way,
    that you simply drop in an image called 'personalheader.jpg' into your /images/
    directory. Dimensions should be at least 760px x 200px. Anything above that will
    get cropped off of the image. */
    /*
    #headerimg { background: url('<?php bloginfo('stylesheet_directory'); ?>/images/header.png') no-repeat top;}
    */
    </style>

    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">

    <div id="header">
    <div id="headerimg">
    <h1>/"><?php bloginfo('name'); ?></h1>
    <div class="description"><?php bloginfo('description'); ?></div>
    </div>
    </div>
    <hr />

    Thread Starter esko

    (@esko)

    anybody able to fill me in on exactly where in that code I need to insert the other code. Thanks for any help.

    I got it to work on mine by inserting this:

    <div id=”header” onclick=”location.href=’http://mydogischelsea.com/&#8217;;” style=”cursor: pointer;”></div>

    You’d have to change mydogischelsea.com to gamerbabble.com. Since I don’t know much about this code stuff, I don’t know if it makes a difference where you put it, but I put it after this section and it worked fine:

    <div id=”header”>
    <div id=”headerimg”>
    <h1>/”><?php bloginfo(‘name’); ?></h1>
    <div class=”description”><?php bloginfo(‘description’); ?></div>
    </div>

    which is at the bottom of header.php. Hope that helps!

    Thread Starter esko

    (@esko)

    thank you so much….worked perfectly….

    Hey,
    Better late than never. I discovered where the problem is. Instead of changing so much, as other posts tell you, you only have to go to the Theme Options>Advanced and where it says “Use these arguments for the blog categories menu” delete the directory reference “wordpress”. It should work!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hyperlinking custom header image…’ is closed to new replies.