how to create child theme in wordpress step by step Guide

By | January 26, 2017
Create And Customize A WordPress Child Theme,Set Up and Use a Child Theme,WordPress Child Theme Step by Step Guide, create child theme without plugin 
how to create child theme in wordpress

how to create child theme in wordpress step by step Guide

child theme in wordpress step by step Guide,Child theme is very important if you want to make changes to your theme. Child theme enables you to modify and customize the theme without having to touch the parent theme. So, if the parent theme gets updated, you won’t lose any customizations made for the website.

The core benefit of a child theme is that is if you have found a theme you like and want to make minor/major changes to it, you can do so with the safety that if the parent theme is upgraded your changes will stay intact.

You literally only need one file to create a child theme, and that’s style.css

To create a child theme, follow the following steps:

    1. Navigate and create a new folder on your themes directory through FTP. The directory is located at wp-content/themes folder.
    1. Once there, create a folder. You can name it anything you like, but the best practice is to write the name of parent theme and then include ‘-child’. That way, your folder will make sense and look neat. For example: twentysixteen-child for twentysixteen  theme.
  1. Now you need to create a file style.css inside the child theme.
  2. Open style.css in your text editor and paste the following code.
     /*
     Theme Name:     twentysixteen Child Theme
     Theme URI:      https://www.wordpress.com/
     Description:    twentysixteen Child Theme
     Author:         codefewer
     Author URI:     http://www.codefewer.com/p/about-us.html
    
     Template:       twentysixteen
    
    
     Version:        1.8
     */
    
     @import url("../twentysixteen/style.css");
    
     /* Add child css from here */
    Theme Name -> The name for your child theme.
    Description -> A short description about your child theme.
    Author -> Your name.
    Author URI -> Website URI of the author.
    Template -> The parent theme
    The most important part of child theme is the following line:
    @import url("../twentysixteen/style.css");
    This line imports style.css from the parent theme, and overrides changes made to the child theme’s style.css. without it, our child theme will not work.

More about Child theme

  1. Save the file and transfer it to your server via FTP.
  2. Check your website’s Dashborad -> Appearance -> Themes. You should now see a Twenty Sixteen Child Theme listed as an available theme. Activate it.
  3. View your site and you should now see your child theme working.

Leave a Reply

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