CategoriesSharePoint

How to hide SharePoint header in modern pages

If you create a site page in SharePoint and want to hide a header like as default Sharepoint home with this command you can hide it.

The whole Idea is the default home page has a specific content type and if you set the page content type to “Home” the header will be hidden.

You can change the content type with this PowerShell command like this:

Set-PnPListItem -List SitePages -Identity “6” -Values @{“PageLayoutType”=”Home”}

In the above command, two parameters are important.

  • -List: is the name of your site page library
  • -Identity: its the ID of your page

Leave a Reply

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