Changing link for brand logo

Hi guys,

This is the site I need help with: https://blog.finspector.ai/

I want the brand logo on the website to go to this URL:
finspector.ai

I tried changing code on the theme, but now it put the domain before that and ends up going nowhere: https://blog.finspector.ai/www.finspector.ai/

This is what the code looks like in partials/navigation:

<header id="gh-navigation" class="gh-navigation is-{{#match navigationLayout "Logo on the left"}}left-logo{{else match navigationLayout "Stacked"}}stacked{{else}}middle-logo{{/match}}{{#match @custom.header_and_footer_color "Accent color"}} has-accent-color{{/match}} gh-outer">
    <div class="gh-navigation-inner gh-inner">

        <div class="gh-navigation-brand">
            <a class="gh-navigation-logo is-title" href="www.finspector.ai">
                {{#if @site.logo}}
                    <img src="{{@site.logo}}" alt="{{@site.title}}">
                {{else}}
                    {{@site.title}}
                {{/if}}
            </a>
            {{> "search-toggle"}}
            <button class="gh-burger gh-icon-button" aria-label="Menu">
                {{> "icons/burger"}}
                {{> "icons/close"}}
            </button>
        </div>

Any help would be much appreciated!

This needs to be href="https://www.finspector.ai"

Hi Cathy!

I just tried that, same issue unfortunately. Any other ideas?

Scratch that, it’s working!

Thanks a lot Cathy :)

1 Like

This worked like a charm in the Casper theme. Simply added to code injection (header) – be sure to change it to your site’s URL.

Here’s the code to put inside opening and closing script tags (can’t seem to publish them here without it reverting to actual code):

document.addEventListener(‘DOMContentLoaded’, function() {
var logoLink = document.querySelector(‘.gh-navigation-logo’);
if (logoLink) {
logoLink.href = ‘https://yourwebsite.com/’; // Replace with your desired URL
}
});