Jump to content

Disable Logo/Site title link.

Recommended Posts

How can I disable the logo link/click through.  I want to make the logo unclickable on all pages or only refresh the current page that they are on. Any help is is much appreciated.

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...
On 11/10/2021 at 7:46 AM, tuanphan said:

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

accesspasssword.png

Hi @tuanphan - do you know what the correct code is for the Wells template?

This is the under construction site: https://www.michellememran.com/about
(if you need the password to access any pages it is LWD)

The ultimate goal would be for the title link to lead back to the ABOUT page. 

To try and disable the link, I used this in the custom css:

logo site-title {
  pointer-events: none !important;
}

It doesn't seem to be working...

Link to comment
3 hours ago, LaurenZA said:

do you know what the correct code is for the Wells template?

This has been answered in the other thread where you posted.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.