A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. Child themes are the recommended way of modifying an existing theme.

There are a few reasons why you would want to use a child theme:

  • If you modify a theme directly and it is updated, then your modifications may be lost. By using a child theme you will ensure that your modifications are preserved.
  • Using a child theme can speed up development time.
  • Using a child theme is a great way to learn about WordPress theme development.

How to Create a Child Theme

  1. Create the child theme directory in your WordPress, which will be placed in wp-content/themes.
  2. Create a stylesheet with information about your child theme (style.css).
/*
Theme Name: Twenty fourteen Child
Theme URL: http://example.com/
Description: This is a child theme of Twenty fourteen
Author: Apri Wd
Author URL: http://apriwd.com/
Template: twentyfourteen
Version: 0.1
*/
@import url("../twentyfourteen/style.css");

 

 

(Visited 111 times, 1 visits today)
1