Support » Theme: Twenty Twelve » Custom URL to header image

  • Resolved kalita

    (@kalita)


    Hi all,

    I would like to add a custom URL link to the header image (currently it goes to the homepage).

    Is there anyway I can do this?

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • in a child theme, add header.php (a copy of header.php of the parent theme Twenty Twelve),
    edit it and find this section:

    		<?php if ( get_header_image() ) : ?>
    		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
    		<?php endif; ?>

    change this part:
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    to include your own link (example):
    <a href="http://example.com/">

    Thread Starter kalita

    (@kalita)

    Perfect, thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.