Jump to content

Disable Logo/Site title link.

Recommended Posts

Add to Home > Design > Custom CSS

.Header-branding-logo {
    pointer-events: none;
}

@cementface

Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 4 months later...
7 minutes ago, sandracheesman said:

@tuanphan Hi I have used your code which works on all pages bar the checkout page, where the logo is still 'clickable'?  Any ideas?

many thanks,

Sandra

You can't add code to Checkout page (/checkout). SS blocked this.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
4 minutes ago, sandracheesman said:

@tuanphan can it be achieved with javascript?  

No. SS blocked the inserting of code into the Checkout page (/checkout) for security reasons.

Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 year later...
17 hours ago, MelindaMellukas said:

Hi, what code did you eventually use to disbale logo link?

Each template needs a different code. Can you share site url?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Hi, My URL is : https://cinnamon-chameleon-6wa9.squarespace.com/ I managed to direct home title ( or logo) to a content pages and not to a cover page when you click the logo. 

 

But I struggle to redirect English (EN) to home-title to en/home, it goes back to home EE which is an estonian version and the deafult langauge.  

 

PS. I havent added translation, just the footer is translated. 

Link to comment

I put this code to footer. It prevents going back to cover page BUT when clicking home button it doesnt stay at the language, it goes back to the default langeage. 

 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
  $(function() { 
  /* SETUP MULTI-LANGUAGE */
  var defaultLanguage = 'et';
  var lang = location.pathname.split("/")[1];
  var defaultClass = 'lang-'+defaultLanguage+'';
  var itemParent = "nav [class*='collection'],nav [class*='folder'],nav [class*='index'],nav [class*='group']";
  if (lang == "en" || lang.length > 2 ){
    var lang = defaultLanguage;
  }

  /* ADD LANGUAGE CLASSES */
  $('a[href="/"]').addClass('lang-'+defaultLanguage+'').parents(itemParent).addClass('lang-'+defaultLanguage+'');
  $('nav a:link:not([href^="http://"]):not([href^="https://"])').each(function () {
    var langType = $(this).attr('href').split("/")[1];
    var multiLanguageClass = 'multilanguage lang-' + langType + '';
    if (undefined !== langType && langType.length <= 2) 
      $(this).addClass(multiLanguageClass).parents(itemParent).addClass(multiLanguageClass);
  });
  $('nav button').each(function () {
    var langTypeFolder = $(this).attr('data-controller-folder-toggle').split("/")[0];
    var multiLanguageClass = 'multilanguage lang-' + langTypeFolder + '';
    if (undefined !== langTypeFolder && langTypeFolder.length <= 2) 
      $(this).addClass(multiLanguageClass);
  });

  /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */
  if (lang == "et") {
    $('a[href="/"]').attr("href", "/et/home");
  }
    if (lang == "en") {
    $('a[href="/"]').attr("href", "/en/home");
  }
 /* ADD EXCLUSION NAV ITEMS */
  $('.exclude-me,.exclude-me a').addClass('exclude');
  $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude');
});
</script>

Link to comment
On 10/15/2021 at 8:24 PM, MelindaMellukas said:

Hi, My URL is : https://cinnamon-chameleon-6wa9.squarespace.com/ I managed to direct home title ( or logo) to a content pages and not to a cover page when you click the logo. 

 

But I struggle to redirect English (EN) to home-title to en/home, it goes back to home EE which is an estonian version and the deafult langauge.  

 

PS. I havent added translation, just the footer is translated. 

It looks like you figured it out. Just tested on english pages & I see when clicking on logo, it redirected to /en/home

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 4 weeks later...
On 11/9/2021 at 12:00 PM, ThinkTank said:

I tried this code but didn't work. Is it different for each template perhaps? Using icosahedron-celery-msxp.squarespace.com

 

Yes. Each template needs a different code. What is password?

accesspasssword.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.