Skip to main content

Hide Title Section in Modern pages

 Open Windows PowerShell and run below command

1. For single page

$PageName = "Home"

$LoginUrl = "https://parentsite-url/sites/sub-site-url/"


Connect-PnPOnline -Url $LoginUrl -UseWebLogin

Set-PnPClientSidePage -Identity $PageName -LayoutType Home

 

2. For All the site pages


$LoginUrl = "https://parentsite-url/sites/sub-site-url/"

Connect-PnPOnline -Url $LoginUrl -UseWebLogin


$pages = (Get-PnPListItem -List SitePages).FieldValues

foreach($page in $pages){

    Set-PnPClientSidePage -Identity $page.FileLeafRef -LayoutType Home

}

Comments