Skip to content

Instantly share code, notes, and snippets.

@AnnaCrumina
Forked from crumina/gist:b59f5a7804fa6135951a
Last active August 29, 2015 14:14
Show Gist options
  • Save AnnaCrumina/60220ad3ff4dd4bde790 to your computer and use it in GitHub Desktop.
Save AnnaCrumina/60220ad3ff4dd4bde790 to your computer and use it in GitHub Desktop.
function custom_url_logo(){
$logo = reactor_option( 'custom_logo_media', get_template_directory_uri() . '/library/img/logo.png' );
$logo2x = reactor_option( 'custom_logo_retina', get_template_directory_uri() . '/library/img/logo@2x.png' );
if ( $logo['url'] || $logo2x['url'] ) : ?>
<div class="logo large-2 medium-2 columns">
<a href="<?php echo esc_url('http:Your custom URL HERE'); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img data-interchange='[<?php echo $logo['url']; ?>, (default)], [<?php echo $logo2x['url']; ?>, (retina)]' alt="" class="hideie">
<img src="<?php echo $logo['url']; ?>" alt="" class="ie">
<noscript>
<img src='<?php echo $logo['url']; ?>' alt='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>'>
</noscript>
</a>
</div>
<?php endif;
}
function crum_replace_logo_url(){
remove_action('reactor_header_inside', 'reactor_do_title_logo', 1);
add_action('reactor_header_inside', 'custom_url_logo', 1);
}
add_action('init', 'crum_replace_logo_url', 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment