This post was most recently updated on December 28th, 2016
How to add CSS link reference to Master Page, Page Layout, Page in a Sharepoint Publishing site?
1. Master Page:
Add the following code inside <head> tags
1 |
<!--SPM:<SharePoint:CssRegistration Name="Path to your CSS file" runat="server"/>--> |
2. Page Layout:
Add below code after <!–ME:</Publishing:EditModePanel>–> tag in your Page Layout
1 |
<link href="(Path to your CSS file)" rel="stylesheet" ms-design-css-conversion="no" type="text/css" /> |
3. Pages:
Add below code after <!–MS:<asp:ContentPlaceHolder id=”PlaceHolderAdditionalPageHead” runat=”server”>–> tag in Page
1 |
<link href="(Path to CSS file)" type="text/css" rel="stylesheet" ms-design-css-conversion="no" /> |