ElkArte Community

Project Support => Support => Topic started by: Aaron101 on March 31, 2022, 07:09:53 am

Title: Logo
Post by: Aaron101 on March 31, 2022, 07:09:53 am
Is there a way to make the logo a link to home page when you have the logo option set to center? It would be nice if it was “clickable” 😁
Title: Re: Logo
Post by: Spuds on March 31, 2022, 08:27:43 am
In the default theme, only the site name is linked.   To link the logo you will have to edit your index.template.php file and change

Code: (fins) [Select]
	echo '
<span id="logobox">
<img id="logo" src="', $context['header_logo_url_html_safe'], '" alt="', $context['forum_name_html_safe'], '" title="', $context['forum_name_html_safe'], '" />', empty($settings['site_slogan']) ? '' : '
<span id="siteslogan">' . $settings['site_slogan'] . '</span>', '
</span>
</h1>';

Code: (replace) [Select]
	echo '
<span id="logobox">
<a href="', $scripturl, '">
<img id="logo" src="', $context['header_logo_url_html_safe'], '" alt="', $context['forum_name_html_safe'], '" title="', $context['forum_name_html_safe'], '" />', empty($settings['site_slogan']) ? '' : '
<span id="siteslogan">' . $settings['site_slogan'] . '</span>', '
</a>
</span>
</h1>';

That is untested, so I don't know if it will cause any layout issues
Title: Re: Logo
Post by: Aaron101 on March 31, 2022, 09:06:53 am
For now I used the menu add on and added a Home button ... I will test this out later today. :)

Thank you!
Title: Re: Logo
Post by: Aaron101 on March 31, 2022, 09:59:51 am
I made the edit and it works great so far it seems. Thanks again! :)