Hide page header in the SharePoint page

Sometimes you need to hide the page header so your page starts without this:

This gives you the flexibility to have anything you want in the header of the page.

Here is how you do that:

  1. Edit the page where you want the header removed

  2. Add the [Embed Script or Code] webpart next to the header. If you can’t find this app in the list, ask your admin to follow these steps on the site where your page is at.
    image

  3. Click the [Edit script or markup] button

  4. Add the following code:

<style>
div[data-automation-id="pageHeader"]
{
display: none !important;
}
</style>
  1. Click the [Save] button.

  2. Save the page

NOTE: The header will show in the page edit mode but not in View mode

Hello, I am new here. How do I add the icon “Embed a Script or Code” to Modern SharePoint? I do not have it in my O365 online version. Thank you

Hey @danscottmiller, the “Embed a Script or Code” app is part of Origami suite, which you need to have installed. Unfortunately, at this moment SharePoint doesn’t let you embed the code on pages any other way.

Awesome, how do I get the Origami suite? Just now starting a project for SharePoint buildout and have a need for this functionality. Thank you

Hey @danscottmiller , you can speak to account manager by visiting origamiconnect.com