Link logo to homepage with correct language

Hi!
How can I link my logo to link to homepage of the current language being used?
This is the default tag <a class="logo" href="<?php echo url() ?>">. It always go to the english which is my default language even when Iā€™m on another language.
Thank you.

You can link the logo like this:

<?php echo $site->language()->url() ?>
2 Likes

@texnixe Wow, thank you!

anyone looking for kirby3 solution, this worked for me:

$site->homePage()->url()

site object appearantly sets automatically the right values for certain keys depending which is the current langauge

1 Like