How to create wordpress child theme.

Posted by meena somendra on February 11, 2015 , Posted in WP Tutorial,

To create a child theme for your theme, you will need to do the following steps:

  1. Create a theme directory in your WordPress install
  2. Create a stylesheet with information about your child theme
  3. Pull in the styles of your parent theme

When these steps are finished you can activate your child theme and your site will appear exactly the same as before,but it will be utilizing your child theme.

So let’s go through the above steps in detail. For this example, I will be creating a child theme for the Twenty Fourteen default theme.

  1. First, go to your theme directory and create a folder for your new theme. You may name it anything you’d like. For example, twentyfourteen-child.
  2. The next step is to create a stylesheet file. This must be named css. Copy and paste the following code into the file you’ve just created:
/*

Theme Name:   Twenty Fourteen Child

Theme URI:   https://corlax.com/twentyfourteen-child/

Description: My first child theme, based on Twenty Fourteen

Author:       corlax team

Author URI:   https://corlax.com

Template:     twentyfourteen

Version:     1.0.0

Text Domain: twenty-fourteen-child

*/
  1. As of right now your child theme works fine and dandy. In the event that you initiate it and reload the page all your substance will be there yet, it will have no styling data. I said before that WordPress first searches for functionality in the child theme and on the off chance that it isn’t display it falls once more on the parent theme.

 

/*

Theme Name:   Twenty Fourteen Child

Theme URI:   https://corlax.com/twentyfourteen-child/

Description: My first child theme, based on Twenty Fourteen

Author:       corlax team

Author URI:   https://corlax.com

Template:     twentyfourteen

Version:     1.0.0

Text Domain: twenty-fourteen-child

*/

 

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

Finally your wordpress child theme have been done…!!

Leave a Reply

Contact Us x