Support » Themes and Templates » CUSTOM link in the header image

CUSTOM link in the header image

  • So, in the header.php we have:

    <?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    		<?php endif; ?>

    How can I use a different link and change it via dashboard, like the image itself? I’m making a blog and the owner wants to set up a different url every time she uploads a new header image.

  • The topic ‘CUSTOM link in the header image’ is closed to new replies.