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:
- Click on the Settings gear and choose “Edit Page” to open the page in Edit Mode
- 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.
- Navigate to the SharePoint Online site >> Click on Settings Gear >> Choose “Site Contents”
- Open the “Site Pages” Library
- Click on the settings gear again and choose “Library Settings”
- Click on the default view to modify it
- Select the ID column and Click on “OK” to add ID to the default view
Thank you! it works.