How to Remove the Top Banner from SharePoint Online Modern Pages?

Requirement: Remove banner from SharePoint Online Modern page.

How to Remove Banner in SharePoint Online Modern Page?

By default, creating a new modern page in SharePoint Online creates a page with a large header on the top of the page. Hiding the top banner from SharePoint Online pages is no longer a difficult task! Just follow these steps:

  1. Click on the Settings gear and choose “Edit Page” to open the page in Edit Mode
    sharepoint online modern page remove banner
  2. Click on “Edit” pencil icon in the “Title Area”. Set the “Layout” to “Plain”, save and close the page.

That’s all! Please note, the Plain layout is a recent update in SharePoint Online. Previously, I had to open the page in SharePoint designer and replace the line:

<mso:PageLayoutType msdt:dt="string">Article</mso:PageLayoutType>

With

<mso:PageLayoutType msdt:dt="string">Home</mso:PageLayoutType>

Hide Banner in SharePoint Online Page using PnP PowerShell: 

Another way to remove the banner from SharePoint Online Modern pages.

Step 1: Connect to SharePoint Online

#Connect to SharePoint Online site
$SiteURL = "https://crescent.sharepoint.com/sites/marketing/2019"
Connect-PnPOnline $SiteURL -Credential (Get-Credential)

Step 2: Get the ID of the SharePoint Online Page

#Get the ID of the Page
Get-PnPListItem -List SitePages

Step 3: Change Page Layout

#Change Page layout from "Article" to "Home"
Set-PnPListItem -List SitePages -Identity "2" -Values @{"PageLayoutType"="Home"}

The above PowerShell script takes ID as the parameter. So, follow these steps to the “ID” column to the “Site Pages” library.

  1. Navigate to the SharePoint Online site >> Click on Settings Gear >> Choose “Site Contents”
  2. Open the “Site Pages” Library
  3. Click on the settings gear again and choose “Library Settings”
  4. Click on the default view to modify it
  5. Select the ID column and Click on “OK” to add ID to the default view

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

One thought on “How to Remove the Top Banner from SharePoint Online Modern Pages?

  • Thank you! it works.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *