How to Create a WordPress Child Theme

Posted OnOct 16, 2013     CategoryThemes     CommentsNo comment

Step 1) Create a directory for your child theme

In wp-content/themes create a new folder for your child theme.

child theme directory

Step 2) Make a Stylesheet for the Child Theme

In the Child Theme’s directory, create a file called style.css. This is where we define the Parent Template and import it’s CSS as highlighted below.

/*
Theme Name:     Twenty Thirteen Child Theme
Theme URI: 		http://wpkb.com.routing.wpmanagedhost.com
Description:    Child theme for Twenty Thirteen
Author: 		WPKB
Author URI: 	http://wpkb.com.routing.wpmanagedhost.com
Template:       twentythirteen
Version:        1.0.0
*/

@import url("../twentythirteen/style.css");


/* ------- Insert custom styles below this line ------- */

Modify the above to fit your needs and save.

Step 3) Confirm the Child Theme is recognized by WordPress

Log in to the WordPress Dashboard and browse to Appearance » Themes where you should see your Child Theme available to activate.

Child Theme ready to activate

Click Activate and move to the next step.

Step 4) Test your Child Theme

Write some CSS that will render a very obvious change, such as modifying the site title.

.site-title {
	color: green;
}

This has the following effect, and confirms that we’ve created a functional Child Theme.

functional child theme with green site title

Leave a Reply

Your email address will not be published. Required fields are marked *

Send this to friend