I'm developing my own theme for Wordpress, using Underscores as a base. It has a fixed header at the top, the height of which will vary, depending on screen size. To avoid content disappearing behind the header, I added an empty div at the top of the page template, called header-push , then in my header.php , I added the following function, which I run on page load. It checks for the height of the header in pixels, and sets my header-push div to...
Originally asked by fraser_ on Stack Exchange (stackoverflow) (CC BY-SA 4.0).