3

I am looking for any idea how to edit/hide Suite Bar Links in SharePoint 2016 on premise. (Link Webs next to Main Branding text)

In 2013 I was using SuiteBarLinks solution, that used Terms links

  • In 2016 you change it via powershell – Waqas Sarwar MVP Sep 18 '16 at 15:31
  • 1
    Can you post some Powershell commands to do it? Thanks – Dominik Divák Sep 19 '16 at 18:45
6

Unfortunately , till now there is no SuiteBarLinks solution like SharePoint 2013 Suite Bar Links Configuration in SharePoint 2016. But alternatively, you can work with Suite Bar via CSS and Jquery as the following :

To hide Suite Bar Links use the following CSS

#suiteLinksBox {
    display: none;
}

To hide a specific Link in Suite Bar like newsfeed

#suiteLinksBox .ms-core-suiteLink-a[id$='ShellNewsfeed'] {
    display: none;
}

To hide the full Suite Bar

#suiteBar {
    display: none;
}

For more details check Hide Newsfeed, OneDrive and/or Sites from the Suite Bar To Add a new link

To Add a new Link at Suite Bar links via Jquery

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script>
<script>
var customLi = "<li class='ms-core-suiteLink'><a class='ms-core-suiteLink-a' target='_blank' href='https://rootsite/SitePages/Home.aspx'>Home</a></li>";
if(jQuery("div#suiteLinksBox").children("ul").length > 0){
        jQuery("div#suiteLinksBox").children("ul").append(customLi);
       }
else {
        jQuery("div#suiteLinksBox").html('<ul class="ms-core-suiteLinkList">' + customLi + '</ul>' )
}
</script>

Ref : Customize SharePoint suite bar

Check also, How to Change SuitBar’s Logo, Text in SharePoint 2016 via PowerShell .

Note :

  • I have applied the above-mentioned code on SharePoint 2013 that I think it's should be working in SharePoint 2016, if you face any issue try to use Developer Tools F12 to specify the Corrected IDs
  • Instead of applying these samples to MasterPage directly , First apply these samples in a Script Editor to a specific page.
| improve this answer | |
  • Css is pefect, but not work. I think this is because css styles, you post are in SuiteNav.css, not in CoreV15.css. For customin CSS im using this <SharePoint:CssRegistration ID="CssRegistration1" name="/SiteAssets/custom.css" runat="server" after="corev15.css" /> – Dominik Divák Sep 19 '16 at 17:05
  • Dear @DominikDivák you are right. as I told you I tried this on 2013 so are you tried to use Developer tools (F12) to catch the corrected ID , also I mentioned the PowerShell article for 2016 by waqas in my answer it's for changing the logo and Text social.technet.microsoft.com/wiki/contents/articles/… – Mohamed El-Qassas MVP Sep 19 '16 at 19:39
  • Hello, yes I have tried catch ID, but noone css styles are applied when they are in SuiteNav.css. Article that you post only shows changing Branding text and logo, but there is no solution for Links :( – Dominik Divák Sep 19 '16 at 22:04
  • Thank you!! used new link to Suite Bar via jquery. Works Great. Only thing had to eidt the masterpages in mysites as well. – devnation Aug 22 '17 at 11:05
-2
#Sites_BrandBar { display: none; }

works perfectly fine for me on SharePoint 2016

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.