How can we help you today?

How to Add a Custom Link to a Modern SharePoint Site Logo

Introduction


By default, the logo on modern sites redirects the users to the site Home Page.

If you would like to change that and make it redirect users to another address, here is what you can do.



Before we begin

  • This article is for Office 365 and SharePoint 2019 environments.
  • This article is for Modern SharePoint Experience
  • You need to have ShortPoint SPFx installed in your environment.

Step 1. Modify the JS code


Here is the JavaScript code that will tell the logo element to redirect users to ShortPoint official web page after you click it:


  • Office 365 environment:


shortpoint.$( document ).ready(function() {

shortpoint.$('[class*="logoWrapper"]').attr('href', 'https://www.shortpoint.com');

});

  • SharePoint 2019:


shortpoint.$( document ).ready(function() {

shortpoint.$('.ms-siteLogo-defaultLogo').attr('href', 'https://www.shortpoint.com');

});



Please modify the www.shortpoint.com part: change it to your desired link. Copy it after it's ready.


Step 2. Insert the code into ShortPoint Theme Builder


Now open the Modern Theme Builder (Site Contents > ShortPoint Dashboard > Theme Builder > Modern).


Go to Utilities > Custom JS.


Paste the code to the box:



Click Apply and Publish.

After the page is published, please refresh the page.


That's it! Now, the logo will redirect you to where you have asked it to.


Related articles:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 15 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more