Forums

Making header image a link? (5 posts)

  1. greybon
    Member
    Posted 6 months ago #

    Hi there. I've installed the Carrington blot theme on my site and I'm using a header image instead of text. But I can't see to figure out how to make my header image link to the home page. Any ideas?

    I'm guessing I need to update something in the header-default.php file. Maybe somewhere here:

    <div id="page">
    		<div id="top"><a class="accessibility" href="#content"><?php _e( 'Skip to content', 'carrington-blog' ); ?></a></div>
    		<hr class="lofi" />
    		<div id="header" class="section">
    			<div class="wrapper">
    				<strong id="blog-title"><a href="<?php bloginfo('url') ?>/" rel="home"><?php bloginfo('name') ?></a></strong>
    				<p id="blog-description"><?php bloginfo('description'); ?></p>
    							</div>
  2. phpprincess
    Member
    Posted 6 months ago #

    I can't seem to find this theme to installed, but here's my guess.

    This is the part that prints your text (site description).
    <?php bloginfo('description'); ?>

    If you want to have an image and link instead, you can replace the above with:

    <a href="<?php echo get_option('home'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/REPLACE_IMAGE.jpg"
    alt="Header Image" border="0" /></a>

    Hope that works. Be sure to add your header image inside the "images" folder of your theme.

    Also check if there's a header.php file in your template too.

  3. greybon
    Member
    Posted 6 months ago #

    Thanks! I'll give it a try! :)

  4. Shane G
    Member
    Posted 6 months ago #

    Hi,

    You need to modify header.php file of your theme..to make your header clickable..refer this article for details:

    [spam link moderated]

  5. skotmb
    Member
    Posted 2 months ago #

    Oh my God! Thank you phpprincess. I thought I was going to go nuts. Great job, great knowledge of php.

Reply

You must log in to post.

About this Topic