Skip to content

Instantly share code, notes, and snippets.

@jerewall
Last active August 29, 2015 14:15
Show Gist options
  • Save jerewall/ed0445b7630401305a9c to your computer and use it in GitHub Desktop.
Save jerewall/ed0445b7630401305a9c to your computer and use it in GitHub Desktop.
Wordpress Header Image
// Wordpress Header Image - Allows you to use the wordpress header GUI to add banners in your theme.
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment