Forums

How To Make The Header Image To A Link (7 posts)

  1. datex
    Member
    Posted 4 years ago #

    Hi

    I use the default theme. I have changed the header to another image. How can I do that when you click at the header you go to an URL e.g. the frontpage.

  2. brandtmarke
    Member
    Posted 4 years ago #

    Do you want to make the whole Header a Link?

  3. datex
    Member
    Posted 4 years ago #

    Yes

  4. datex
    Member
    Posted 4 years ago #

    I have a logo in the middle so I cannot use the ordinary text to link from since it covers the logo.

  5. Shane G
    Member
    Posted 4 years ago #

    Hi,

    You can get the solution via below mentioned link:

    Designing Headers

  6. brandtmarke
    Member
    Posted 4 years ago #

    I think you can do this via css. open your style css and modify /add the following selectors:

    div #headerimg h1 {
    	padding: 0;
    }
    div #headerimg h1 a {
    	display: block;
    	padding-top: 70px;
    	height: 140px;
    }
    #headerimg div.description {
    	position: absolute;
    	top: 130px;
    	text-align: center;
    	width: 740px;
    }
  7. brandtmarke
    Member
    Posted 4 years ago #

    oh sorry, i didint read your 3rd post ...

    open the header.php of the default theme and change:

    <div id="header">
    	<div id="headerimg">
    		<a href="<?php echo get_option('home'); ?>/"><h1><?php bloginfo('name'); ?></h1>
    		<div class="description"><?php bloginfo('description'); ?></div></a>
    	</div>
    </div>

    to

    <div id="header">
    	<div id="headerimg">
    		<a href="<?php echo get_option('home'); ?>/">&nbsp;</a>
    	</div>
    </div>

    add to your style.css:

    div#headerimg a {
    	display: block;
    	height: 140px;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags