WordPress.org

Ready to get started?Download WordPress

Forums

TwentyXS
[resolved] How can I add a link to my header image? (4 posts)

  1. JosiahLowe
    Member
    Posted 1 year ago #

    Hi there, the title says it all. I need to add a "back to home" link to my image header and I can't figure out how to do that.

    http://wordpress.org/extend/themes/twentyxs/

  2. Tammie
    Member
    Posted 1 year ago #

    Hi, Just having a look at this I think it will be a bit of a dip into the code. You want to start with header.php and probably do this in a child theme (http://codex.wordpress.org/Child_Themes) (if you are able).

    First up in header.php there is the following

    elseif ( get_header_image() ) : ?>
    						<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" />
    					<?php endif; ?>

    Where it says img src you can before that add in a link:

    <a href=""><img src.../></a>

    You probably want to look at http://codex.wordpress.org/Function_Reference/site_url to get the link for that.

  3. JosiahLowe
    Member
    Posted 1 year ago #

    Awesome! It worked wonderfully.

    Thanks!

  4. Tammie
    Member
    Posted 1 year ago #

    Cool glad it worked.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags