• I am adding a custom header and footer to my blog, to make it fit in with the rest of my site. I’ve created a child theme for the twenty fifteen theme and made a new header.php file.

    However, getting rid of <?php wp_head(); ?> means that all styling on the page disappears.

    I want the styling to remain for the page content, and also have my own footer and header.

    at the momentm Leaving in wp-head leaves an unnecessary div on the left hand side. http://www.tinywolf.uk/blog – this is viewable at higher widths. I need to get rid of this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • OK, you definitely cannot get rid of the function call to wp_head(), it is pretty much essential. You need to figure out what’s causing that empty space to the left, and it’s not an extra DIV. It’s a before pseudo-element that’s attached to the body element. You can get rid of that space by adding this rule to your child theme’s style.css file:

    body:before {
        width: 0;
    }

    Thread Starter tinywolves

    (@tinywolves)

    Hi thanks, this sorted the problem, however there is another issue now, which is that there appears to be a pseudo element just below the header. http://www.tinywolf.uk/blog

    i’ve posted about this here

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Keeping page styling with custom header’ is closed to new replies.