I have recently created a custom master page for a SharePoint 2016 environment. My issue is that it is now showing on Pages like Add a Page, which is not ideal. Is there anyway i can change this so the dialog boxes do not show the custom master page?
s4-notdlg ms-dialogHidden these are the two class name which will solve your problem.
Also read the explanation here. Method for adding a Watermark Logo/Text to bottom of each Sharepoint page
Did you set master page programatically? If so, then there are two properties on SPWeb object:
What you should set, is CustomMasterUrl (point to your new custom master page) and not MasterUrl.
Please find more info here
1) Set Seattle to default master page. 2) problematically include your custom master page where you should only use the custom master page.
Include the below code in page(.aspx) to use custom master page.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyPage.aspx.cs" Inherits="SPBranding.Pages.MyPage" MasterPageFile="Custom.master" %>
If you do this way,default master page will show in 'add a page'.