Hide SharePoint Site Title using jQuery

This SharePoint tutorial, we will discuss how to hide SharePoint site title using JavaScript or jQuery in SharePoint Online/2013/2016.

We can hide the site title on a particular page or from all the pages in the SharePoint site. The approach will work in SharePoint classic sites, not in the modern SharePoint sites.

Hide SharePoint site title

Recently I got a requirement to hide site title from a specific page, so there I have used jQuery to do that. Edit the page and then add a script editor web part and write the below code within that.

<script language="javascript" type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(hideSiteTitle,'sp.js');
function hideSiteTitle()
{
document.getElementById("pageTitle").style.display='none';
}
</script>

The above code will hide the SharePoint site title from the particular page only.

If you want to hide the site title from all the pages in the SharePoint site, then we need to add the code inside the master page in SharePoint.

Open your master page using SharePoint designer 2013 and place the below code inside the head tag.

<script type="text/javascript">
function hidePageTitle() {
var elem = document.getElementById('pageTitle');
elem.style.display = 'block';
}

_spBodyOnLoadFunctionNames.push("hidePageTitle");
</script>

Also, we can remove the Site title by removing the text from the SharePoint site settings page.

Open the SharePoint site settings page and then under the Look and Feel select Title, description, and logo. Here, remove the text in the Title box.

You may like following SharePoint customization tutorials:

Here, we learned how to hide the SharePoint site title using jQuery in SharePoint Online or SharePoint 2013/2016. In the same approach, we can also see how to hide page title from a page in SharePoint using jQuery.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>