Edit Suite Bar Links in Sharepoint 2016
-
08-12-2020 - |
Question
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
Solution
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.
OTHER TIPS
#Sites_BrandBar { display: none; }
works perfectly fine for me on SharePoint 2016