Sometimes you don’t want your site-wide (i.e. global) fixed, header, or footer regions to be visible.
The code in this post will show you how to disable these regions for specific pages.
Examples use cases include:
Your first thought might be to look for an option in PageLines DMS to disable the fixed, header, and/or footer areas just for that one page. However, there’s no option for that. There’s only a global checkbox option.
So you might think to just do CSS display:none; to hide it, but this isn’t ideal because your header and footer are technically still being loaded in the browser, just not displayed.
Here’s the LESS CSS code for that (although it’s not recommended):
But the best way is to just not load it on the page at all, which means we need some PHP code in our child theme’s functions.php.
Here’s the recommended way to accomplish this:
There you have it!