WordPress.org

Ready to get started?Download WordPress

Forums

Need help linking header to homepage (2 posts)

  1. TheSlenderStudent
    Member
    Posted 1 year ago #

    I'm using the Mon Cahier theme and I'm trying to figure out how to link my custom header image to my homepage (http://www.TheSlenderStudent.com)

  2. Hi there,

    If you look at your theme files you'll see in the header.php this line:

    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />

    You could change this to:

    <a href="<?php echo home_url( '/' ); ?>"><img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" ></a>

    Of course it would be better if you made a child theme. If you make changes to the theme and there's an update, your changes may get lost, but I'm not planning on making any changes soon. If I do, I'll make sure to add an option to link the header image. I should have thought about that. :)

Topic Closed

This topic has been closed to new replies.

About this Topic