WordPress.org

Ready to get started?Download WordPress

Forums

hyperlink headerimg to my homepage....? (2 posts)

  1. ronmdon
    Member
    Posted 7 years ago #

    All I want to do is link the headerimg to my homepage so you can click anywhere on the image and go back to the homepage.
    This should be a pretty simple task, but for some reason I am unable to complete it.

    Here is the header code from the template:

    <!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'); ?>" />

    <?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>
    /" title="My Homepage">
    </div>

    </div>

    Seems simple enough, but it wouldn't work for me.

    any ideas?
    Thanks,

    Ronan

  2. Jeremy Clark
    Moderator
    Posted 7 years ago #

    Not sure what you were trying to accomplish with the last few lines of your post as they were screwed up by the forum. Next time use the code tag around any html or css your inserting into a post.
    As for your question after a quick search on google I think your best bet would be to either find the name of the header image in you css file and then put that as a link in the div headerimg. Or you could just use a transparent gif inserted into the div as the link.

Topic Closed

This topic has been closed to new replies.

About this Topic