Headerless Home Pages - Create new Home.aspx?

SP_Steve 231 Reputation points
2020-12-10T20:26:20.567+00:00

The default home page for a new site (Home.aspx) does not have a page header, which is preferred. If I create a new page, I am forced to have a header. Is there a way to create a new page without the header?

It is a long story, but a vendor migrated us to SharePoint Online two years ago and created new home pages and I cannot find the original Home.aspx pages on all our sites, so I may need to recreate them. If that is the case, is there a way to get SPO to generate a new home page?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Allen Xu_MSFT 13,866 Reputation points
    2020-12-11T06:35:32.627+00:00

    You can remove the header of a page using the bellow PowerShell Command after creating a new page(header is also created when creating a new page).

    $PageName = "PageName"  
    $LoginUrl = "https://contoso.sharepoint.com/sites/siteName"  
      
    Connect-PnPOnline -Url $LoginUrl -UseWebLogin  
    Set-PnPClientSidePage -Identity $PageName -LayoutType Home  
    

    Note: Replace the variable below with your own and you will have a page without the title header.

    If you intend to remove from all the Site Pages header, please refer to the following PowerShell Command. However, I would recommend making some backup before you do it.

    $LoginUrl = "https://contoso.sharepoint.com/sites/siteName"  
    Connect-PnPOnline -Url $LoginUrl -UseWebLogin  
    $pages = (Get-PnPListItem -List SitePages).FieldValues  
    foreach($page in $pages){  
        Set-PnPClientSidePage -Identity $page.FileLeafRef -LayoutType Home  
    }  
    

    To get SPO to generate a new home page, you can create a new page firstly and set the new page as homepage.
    Create a new page -> Go to Site contents -> click ellipsis next to the new page -> Make homepage:
    47229-6.png

    I hope this information has been useful, please let me know if you still need assistance.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.