Forum Discussion
How to Demote News page from Team site and Remove it from Hub News Rollup
Just tried this, and it worked!
https://sharepoint.stackexchange.com/a/290580
- Go to the Site Pages library.
- Click Add column.
- Select Show/hide columns.
- Select Promoted State.
- Click Apply.
- Click the Promoted State column heading.
- Hover over Column settings.
- Select Edit.
- Without doing anything in the Edit column pane, click Save.
- Select the line for a page (i.e. no need to open the page).
- Open the information pane.
- Under Properties, change the promoted state.
- Republish the page or repost the news post.
Update (Nov. 2, 2022): I noticed recently that the ability to edit certain columns (e.g. Promoted State [see step 8 above] or First Published Date) has been removed on certain sites, so the instructions above may not work! When I first encountered this a couple of days ago, with the First Published Date column, I asked a Microsoft 365 specialist in my company to help me run a script in Windows PowerShell ISE as an administrator to make changes to that column. He needed to grant me access on the back end, download certain packages to PowerShell, and run a script he wrote. I tweaked his script below, so it should make changes to the Promoted State column if you follow the steps below.
- In your Site Pages library, show the ID column.
- Note the ID number of the page whose state you'd like to change.
- In the script below, just change lines 1, 3, and 4:
- Line 1: Enter the URL of the site on which the page is stored
- Line 3: Enter the ID number of the page whose state you'd like to change
- Line 4: Enter the desired promoted state (i.e. 0 for a page, 2 for a news post)
- Run the script.
$SiteURL = "<Insert SharePoint site URL here>"
$ListName= "Site Pages"
$NewsID = 86
$PromotedState = "0"
Connect-PnPOnline -Url $SiteURL -Interactive
if (-not (Get-PnPContext)) {
Write-Host "Error connecting to SharePoint Online, unable to establish context" -foregroundcolor black -backgroundcolor Red
return
}
else{
Set-PnPListItem -List $ListName -Identity $NewsID -Values @{"PromotedState"=$PromotedState;} -UpdateType SystemUpdate
Write-Host $PromotedState
Write-Host $NewsID
}
- calebleeNov 03, 2022Brass Contributor
- calebleeNov 08, 2022Brass Contributor
- Anthony-123Nov 08, 2022Iron ContributorGreat! I'll give this a shot this week. Thank you!