Monday, November 2, 2015

Inheriting parent site Theme in sub-sites - SharePoint 2013

How to inherit parent site theme on subsites?

Theme Inheritance – Publishing Sites


Site Settings > Master Page, under the Theme section of that page check "Reset all subsites to inherit the theme of this site"









Theme Inheritance – Non-Publishing Sites

Open SharePoint Management Shell as Administrator and start next command:
$url = "http://your-site"
$site = Get-SPSite -Identity $url
Write-Host "RootWeb Theme: " site.RootWeb.ThemedCssFolderUrl
foreach ($web in $site.AllWebs) {
  Write-Host "Web Title: " $web.Title
  Write-Host "Web Theme: " $web.ThemedCssFolderUrl
  $web.ThemedCssFolderUrl = $site.RootWeb.ThemedCssFolderUrl
  $web.Update()
  $web.Dispose()
}
$site.Dispose();

No comments:

Post a Comment