Home > SharePoint, SharePoint 2013, SharePoint Online > SharePoint 2013 – Hide page title

SharePoint 2013 – Hide page title

Here is a snippet which can be used to hide page title. All you need to do is edit the master page and place the script inside head tag

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

	_spBodyOnLoadFunctionNames.push("hidePageTitle"); 
</script>
  1. March 7, 2014 at 12:28 AM

    Thanks this doesn’t work for me. I tried adding to the PlaceHolderAdditionalPageHead in my web part page.

  2. A.m.a.L Hashim
    March 7, 2014 at 12:36 AM

    Check for JavaScript errors on the page.

    • March 7, 2014 at 1:00 AM

      I found the problem, I needed to use elem.style.display = ‘block’; instead of elem.style.display = ‘block’; in your example.

      That removed the top page name, but how do I remove the page name of the web part page itself, not master page.

      • March 7, 2014 at 1:01 AM

        opps I meant:
        elem.style.display = โ€˜noneโ€™;

  3. A.m.a.L Hashim
    March 7, 2014 at 1:02 AM

    You can find the element name using browser developer tools and apply a similar logic for hiding.

  4. March 7, 2014 at 1:08 AM

    Many thanks – I just switched ‘contentBox’ for ‘pageTitle’ and all is well ๐Ÿ™‚

  5. Siddhesh
    February 20, 2015 at 3:45 PM

    Hi,

    I guess if you want to hide “Page Title” it should set to “none” instead “block”.
    Add code in ScriptEditor webpart on page.

    var elem = document.getElementById(‘pageTitle’);
    elem.style.display = ‘none’;

  1. No trackbacks yet.

Leave a reply to Siddhesh Cancel reply