You can achieve that hardcoding the link. Open the logo.php file and replace <?php echo $homeUrl ?> (see screenshot) with your custom link. Btw I'd recommend that you make that change on the child theme so you are not going to lose it on next theme update.
I found the logo.php and <?php echo $homeUrl ?> there. Changed to http://mydomain.com/ and nothing happened. Only the button stopped working. In the links you sent me are only manuals how to make a child theme. Nothing about the problem. Can you advice me a little bit further? Here is the logo.php. How should we change it in order to make the logo a link to a different website?
And, yes, those links shows you how to create a child theme. Once you do that, you can create a nav.php file inside the child theme and make changes in that file.
Hello,
I would like a logo image (150x150) to be a link, instead of homepage button.
Can you give me an advice on custom CSS?
Thank you
Hi,
You can achieve that hardcoding the link. Open the logo.php file and replace <?php echo $homeUrl ?> (see screenshot) with your custom link. Btw I'd recommend that you make that change on the child theme so you are not going to lose it on next theme update.
Ref: https://codex.wordpress.org/Child_Themes
https://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme/
https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/
Hello, thanks for reply.
I found the logo.php and <?php echo $homeUrl ?> there. Changed to http://mydomain.com/ and nothing happened. Only the button stopped working. In the links you sent me are only manuals how to make a child theme. Nothing about the problem. Can you advice me a little bit further? Here is the logo.php. How should we change it in order to make the logo a link to a different website?
<?php
if ( is_front_page() ) :
$homeUrl = home_url( '/#start' );
else :
$homeUrl = home_url( '/' );
endif;
?>
<div id="logo">
<a href="<?php echo $homeUrl ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" >
<h1><?php bloginfo( 'name' ); ?></h1>
</a>
</div>
Here's an example: https://codeshare.io/GApD6k
And, yes, those links shows you how to create a child theme. Once you do that, you can create a nav.php file inside the child theme and make changes in that file.