Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Created December 2, 2014 09:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameskoster/16ae37d6da92e3526956 to your computer and use it in GitHub Desktop.
Save jameskoster/16ae37d6da92e3526956 to your computer and use it in GitHub Desktop.
Storefront - add a custom logo
add_action( 'init', 'storefront_custom_logo' );
function storefront_custom_logo() {
remove_action( 'storefront_header', 'storefront_site_branding', 20 );
add_action( 'storefront_header', 'storefront_display_custom_logo', 20 );
}
function storefront_display_custom_logo() {
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="site-logo-link" rel="home">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png" alt="<?php echo get_bloginfo( 'name' ); ?>" />
</a>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment