SharePoint Online Modern pages have header image banners in all modern pages; i.e., Communication or Team Sites. Header image banner needs a background image or text, it takes almost 40% of the page, and we can’t remove this section using User Interface.
If you want to turn this section ON or OFF, it is possible using PnP PowerShell command. Basically, it allows us to change the page layout from Article to Home. The homepage layout doesn’t have a header image banner section.
Remove the Header Image Banner Section
Open SharePoint Online Management Shell and run the below command in sequence.
- # Connect to the site
- Connect-PnPOnline https://mittal1201.sharepoint.com/sites/teamsite
- # List all pages, and find the id of the modern page
- Get-PnPListItem -List SitePages
- # Change layout from "Article" to "Home" to remove top banner
- Set-PnPListItem -List SitePages –Identity <id> -Values @{"PageLayoutType"="Home"}
Screenshot for your reference.
After executing this command, refresh the page. You will not find the header image banner.
Happy Coding.
Does your blog have a contact page? I'm having trouble locating it but, I'd like to send you an e-mail. I've got some ideas for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it expand over time.
ReplyDeletePretty nice post. I just stumbled upon your weblog and wished to say that I have really enjoyed surfing around your blog posts. In any case I'll be subscribing to your feed and I hope you write again soon!
ReplyDeleteWe are a group of volunteers and opening a brand new scheme in our community. Your website offered us with helpful info to work on. You have done a formidable task and our entire group will be grateful to you.
ReplyDelete