4

I want to remove the sharepoint label from that suite bar.

ms-core-brandingText this varibale to be set as nothing.

I tried this :

<script type='text/javascript' src='https://code.jquery.com/jquery.min.js'></script>
<script type="text/javascript">
     var suitebar = $("#suiteBar");
     var branding = suitebar.find(".ms-core-brandingText");
    suitebar.SuiteBarBrandingElementHtml = '<div class="ms-core-brandingText"> sample text </div>'

</script>
    </head>

5 Answers 5

5

Customizing SharePoint 2013 SuiteBar Branding Text using jQuery is simple

OOB branding text looks something like below screen shot.

enter image description here

And if we study the source of it using developer tool we can see an html structure like below screen shot.

enter image description here

So to remove the text below jQuery code can work

$('div#suiteBarLeft .ms-core-brandingText').text("");

And if we want to replace the text with something else then,

$('div#suiteBarLeft .ms-core-brandingText').text("Hello World");

Also if we need to place some html then,

$('div#suiteBarLeft .ms-core-brandingText').html("<span>Hello World</span> <img src='your img path'>");

The result of our customization will be something like below

enter image description here

Refer this blog for more details.

2
  • 1
    Is there any way to get around the fact that the user can see "SharePoint" change to "Hello World" in the second after the page displays. Clearly, this is because the JavaScript is executing. And although it executes quickly, it does not execute quick enough for this change of text to be invisible to the user.
    – Submits
    Commented Jun 4, 2015 at 11:24
  • 1
    @Submits : As Amal Hashim has answered, we can hide the suite bar with css which is to be written in master page. div#suiteBarLeft .ms-core-brandingText {display:none}, and then once you change the text of it by JavaScript make it visible ` $('div#suiteBarLeft .ms-core-brandingText').css('display', 'block')`. So this will not show any effect of change but just appearing of text.
    – Asad Refai
    Commented Jun 4, 2015 at 11:55
9

You can do it on a web application level with PowerShell to.

$app = get-spwebApplication "http://webapplicationGoesHere"
$app.SuiteBarBrandingElementHtml = "<div class='ms-core-brandingText'>Text or space here</div>"
$app.Update()
2
  • I use the above method to add navigation back to the main site collection on the My Sites web application. It works great. I have also used it on the Central Admin Site to add quick links to common CA pages. (probably bad practice, but I'm lazy when it comes to clicking) Commented Jun 3, 2015 at 16:20
  • Yeah, i have done the same. :) Commented Jun 4, 2015 at 6:26
2

Best option is to hide the element using CSS.

Add following before </head> tag

<style>
    #suiteBar {
        display: none;
    }
</style>
2
  • Any other way other than css?
    – niru dyogi
    Commented Apr 15, 2015 at 14:58
  • The SuiteBar is loaded asynchronously. Probably using browser tool you can find out the exact event and override those using your custom event. Another option is to use timer to check if suitebar is loaded and then change it.. but that is not an elegant approach. I would suggest you use CSS to hide it and use JavaScript to create dynamic elements and place it in the location of SuiteBar. Commented Apr 15, 2015 at 15:00
1

Yes, you can definitely put your own text up in that bar, or the text or hide the out of the box text. CSS should do the trick, either in your own alternate CSS (or if necessary in the master or the page).

.ms-core-brandingTest:before{
   content:'RuthCorp Intranet';
   color:white
}

.ms-core-brandingTest{
   color:rgb(0, 114, 198)
}
1

<style> .ms-core-brandingText:after{content:"INSERT TEXT HERE";} .ms-core-brandingText{margin-left: -55px;} </style>

1
  • Could you try to explain a little more?
    – Benny Skogberg
    Commented May 14, 2016 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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