Site Title snippet in SharePoint 2013/2016/Online custom master page

This SharePoint tutorial explains, how to add site title in SharePoint 2013/2016/Online custom master page. The Site title snippet can be generated from design manager in SharePoint 2013/2016/Online.

Site Title snippet in SharePoint 2013/2016/Online custom master page

Recently we created a SharePoint 2013 custom master page and somehow we miss the site title snippet. So when we apply the custom master page in a SharePoint site collection, the SharePoint site title did not appear in the pages.

Below is the code you can add in the mycustommasterpage.html and the SharePoint site title will automatically reflect in the .master page.

<h1 id="pageTitle" class="ms-core-pageTitle">
<!–SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderPageSiteName" class="ms-core-navigation" runat="server">–>
<!–SPM:<asp:ContentPlaceHolder id="PlaceHolderSiteName" runat="server" >–>
<!–SPM:<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitle1″ >–>
<!–SPM:<SharePoint:ProjectProperty Property="Title" runat="server" />–>
<!–PS: Start of READ-ONLY PREVIEW (do not modify)–>Default Publishing Site<!–PE: End of READ-ONLY PREVIEW–>

But if you want to put in the master page (.master file) directly then you can add like below:

<SharePoint:ProjectProperty Property="Title" runat="server"/>

If you want that to come as a hyperlink, then you can use like below:

<SharePoint:SPSimpleSiteLink NavigateUrl="~sitecollection/" runat="server" id="sitelink"> </SharePoint:SPSimpleSiteLink>

You may like following SharePoint master page tutorials:

This SharePoint tutorial, we learned how to use the SharePoint Site Title snippet in SharePoint 2013/2016/Online custom master page, so that the Site title will appear in the sites, where the custom master page has been applied.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.