Skip to content

Instantly share code, notes, and snippets.

@congthien
Created October 10, 2017 03:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save congthien/09674ad0afc0639199d7edadb690e52a to your computer and use it in GitHub Desktop.
Save congthien/09674ad0afc0639199d7edadb690e52a to your computer and use it in GitHub Desktop.
add_filter( 'get_custom_logo', 'onepress_child_custom_logo' );
function onepress_child_custom_logo() {
$custom_logo_id = get_theme_mod( 'custom_logo' );
$html = sprintf( '<a target="_blank" href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
esc_url( home_url( '/' ) ),
wp_get_attachment_image( $custom_logo_id, 'full', false, array(
'class' => 'custom-logo',
) )
);
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment