Hello destincj,
To change the link on the logo then first back up the file header-hooks.php inside your theme folder, then edit the file header-hooks.php, go to the line no. 213
<?php the_custom_logo(); ?>
change this with your desired logo with link using html
Hope this will helps you.
Thanks.
Hello guys,
Thanks @addweb-solution-pvt-ltd for contributing to the topic. Your solution is correct.
But it will be better not to hardcode the url to the theme.
So here is a better solution.
add_filter( 'get_custom_logo', 'custom_logo_url' );
function custom_logo_url ( $html ) {
$custom_logo_id = get_theme_mod( 'custom_logo' );
//Your Custom URL
$url = 'www.mysiteurl.com'; //Replace the URL with your own.
$html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
esc_url( $url ),
wp_get_attachment_image( $custom_logo_id, 'full', false, array(
'class' => 'custom-logo',
) )
);
return $html;
}
You need to replace the url – http://www.mysiteurl.com in line number 5 with your own url and it’s done.
Read this article to know the correct way to add a code snippet to the theme – https://whitedot-docs.zeetheme.com/docs/developers/adding-php/
Let me know if the problem is solved.
Thank you both for using WhiteDot.
-
This reply was modified 7 years, 1 month ago by
ZeeTheme.
You have not replied for 6 days. Looks like your issue is solved.
I am Marking this topic as resolved.