Skip to content

Snippet: Automatically Add Space Under Header For Pages Without a Title

Important: There is now a setting in the Customizer for this so you don't need to use custom code!

Whenever you disable the main page header title for any page there will no longer be any space between the header and the main content to allow for designs where you may want something flush against the header. You can always add spacing with the page builder but if you want to automatically add spacing you can do this with CSS.

body.page-header-disabled #main {
    padding-top: 30px;
}
Back To Top