How to Remove the Top Banner from SharePoint Online Modern Pages

How to Remove the Top Banner from SharePoint Online Modern Pages
Photo Credit: unsplash/halacious

How to Remove the Top Header in SharePoint Online Modern Page?

When creating a page in modern SharePoint Online you will notice that the page includes a large header on the top of the page where you can upload and display an image as a banner along with the page title. In some situations, you may need to hide the top banner from SharePoint Online pages here are the steps:
  • Click on the Settings gear and choose “Edit Page” to open the page in Edit Mode
SharePoint online modern page remove banner
  • Click on “Edit” pencil icon in the “Title Area”. Set the “Layout” to “Plain”, save and close the page.
The plain layout is a new page layout that was introduced in SharePoint Online. You can use this page layout if you want to keep your message simple or when you don’t have a nice banner available for you page. Previously, you would have to delete the image itself to get this. Now it is a bit more user friendly by just switching the layout to the plain option. Nice thing about this is you could switch, without deleting the image.

But if you want to completely remove the top section from the page header, you need to use PnP PowerShell by applying the following steps: 

Step 1: Connect to SharePoint Online

#Connect to SharePoint Online site
$SiteURL = "https://mysite.sharepoint.com/"
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
Get-PnPListItem -List SitePages

Step 3: Change Page Layout

#Change Page layout from "Article" to "Home"
Set-PnPListItem -List SitePages -Identity "5" -Values @{"PageLayoutType"="Home"}
The above PowerShell script is considering "5" as the page ID, this is the ID of the page that we want to remove its header. Another way to get the page ID is by adding the column "ID" to the default view of the "Site Pages"
  • Navigate to the SharePoint Online Portal
  • Click on Settings Gear then 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

Post a Comment

Previous Post Next Post