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>
Categories: SharePoint, SharePoint 2013, SharePoint Online
Javascript, SharePoint
Thanks this doesn’t work for me. I tried adding to the PlaceHolderAdditionalPageHead in my web part page.
Check for JavaScript errors on the page.
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.
opps I meant:
elem.style.display = โnoneโ;
You can find the element name using browser developer tools and apply a similar logic for hiding.
Many thanks – I just switched ‘contentBox’ for ‘pageTitle’ and all is well ๐
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’;