Change SharePoint 2013 Site Logo Link to Root Site URL
By default, clicking the SharePoint 2010 or SharePoint 2013 site logo – Takes us to the root of the current site or sub-site. But you may want to link the logo to a top-level site. Well, to change this behaviour, you got to change the master page.
Important: Since this is a Master page change, You have to apply the updated master page to all site collections for the changes to take effect!
Set SharePoint 2010 logo link root site:
- Open your Master page in SharePoint Designer 2010, Locate the below line:
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic">
- Replace the ~site value with ~sitecollection .Save and close the master page (approve and publish, if required!) . This changes SharePoint 2010 logo link to root site collection.
SharePoint 2013 – Change site logo link URL:
- Open your SharePoint 2013 site in SharePoint designer 2013, Edit the master page in “Advanced Edit Mode”,
- Locate the following code :
<SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" > <SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=23" runat="server"/> </SharePoint:SPSimpleSiteLink>
- Replace the control <SharePoint:SPSimpleSiteLink> with <SharePoint:SPLinkButton> and add the “NavigateUrl=”~sitecollection/” attribute to it.Here is the modified code:
<SharePoint:SPLinkButton NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" > <SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=23" runat="server"/> </SharePoint:SPLinkButton >
This changes the logo link URL pointing from the current site to the Root Site!
I followed all the steps and published but it still doesn’t work.
Thanks for posting this. However, despite following all these steps and editing the master pages on SharePoint Design Manager, I’m still unable to see the changes being applied to the SharePoint site. Any thoughts on what needs to be done additionally? I greatly appreciate your help.
Try checking the page in and approving it.
**In javascript :**
Using SP Chrome editor, upload a file in style library and script link to this js.
Edit the JS and add :
window.onload = function(){
Var urlLogo = “/sites/xx/xx/xx”;
document.getElementById(“ctl00_onetidProjectPropertyTitleGraphic”).href = urlLogo;
}
What about redirecting it to a site page? The site Home page