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 start:

  • This article is for Office 365
  • 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:


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

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

});


If you are using Sharepoint 2019, the code you need to use is slightly different:


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, please open the Modern ThemeBuilder (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: