Removing The Header on SharePoint Online Modern Pages
In SharePoint Online you will find two styles of SharePoint pages: classic and modern. Classic pages are the standard SharePoint pages we have known for many years. Modern pages are the new responsive design and it’s clear that modern pages are the future direction for SharePoint. Modern pages are built on the new SharePoint Framework development model and new features and templates were announced at the recent SharePoint Virtual Summit.
On a SharePoint Online site, if you click the settings menu and click the ‘add a page’ menu item it will create a new modern page and open it in edit mode. Looks great at first, but the most common reaction from clients and business users I work with is they want to get rid of the rather large header on the top of the page.
But modern pages are very locked down and you don’t have an option to remove the header through the page properties or settings. (and modern pages don’t have a script editor web part so you can’t apply your own css to hide the page header).
Fear not! There is a fairly straight forward no code solution to get rid of the header and keep your page out of the box.
If you haven’t already done so, click the ‘save and close’ button on your new page. You don’t need to publish the page at this point.
Next, open the site in SharePoint Designer 2013. Open the Site Pages document library and open your new modern page. Click the ‘Edit File’ link on the page screen.
Click ‘Yes’ at the prompt.
Next, you will find a line with the phrase ‘PageLayoutType’. On this line, delete the word Article, and replace it with the word Home.
Save the page in SharePoint Designer. Then go back to your browser and edit the page again, no header!
Then if you want to do additional header-less pages on that site you can copy the page you fixed in the site pages document library, you don’t have to go through the entire process again.
I like this solution because you can use SharePoint Designer to update a property you can’t get to through the browser. And we’re staying completely out of the box, we’re just changing from one out of the box modern page template to another. (you may recognize the ‘Home’ modern page layout from the SharePoint site home page on Office 365 groups.)
Thanks for your article. I just tried this on a O365 SharePoint “Site Page” and instead of removing the Header that is the same across most SharePoint pages on that site, it removed the customized body of the “Site Page”. Any suggestions ?