WordPress Child Theme Made Easy

I’m all about making things simple. WordPress works but there are lots of extraneous lines in any given stylesheet.

WordPress suggests we use child themes if we want to modify the appearance of our blogs.

One reason we may need to use child themes is if we want our site to validate under the W3C guidelines. To see if your css is valid go to w3.org/css-validator – use the direct input method.

When the validator finishes scroll down the page and you’ll see a valid style sheet. Copy it, save it as (child.css), upload it to the wordpress directory (domain/wordpress/child.css).

In the wordpress blog dashboard add this line to the header.php:

<link href="https://your-domain/wordpress/child.css" rel="stylesheet" media="all" type="text/css" />

Now when the next wordpress update is made you’ll still have your style modifications intact.

You may need to make this change in the header.php too, If you see a tag named “hgroup” (I think thats what it is, I removed it a while ago). Replace it and what’s inside it with:

<h1 class="site-title">Your Great Big Blog Title</h1>
<h2 class="site-description">My Great Big Blog</h2>

You may not need to do this depending on your theme. I am using the stock 2012 theme.

Once finished we have a valid stylesheet we can monkey with and know it’s safe from future updates.