How to Create a WordPress Child Theme

  • Navigate to the themes directory of your WordPress website and create a new child theme sub-folder in the path of your themes folder (for example, yourwebsitedomain/wp-content/themes/ChildTwentyFourteen/).  This sub-folder is going to be your new child theme folder for your current themes.  Mane the sub-folder something like “ChildTwentyFourteen” or be a little more creative than me.
  • Search Google for — child theme wordpress codex — and the first link that you should find and follow is to http://codex.wordpress.org/Child_Themes
  • On the codex support page which will be displayed from your search, please locate and copy the gray block of code to your clipboard memory.  Make sure you copy every line including the /* — */ comment part.  The code you copy should look like this:

/*
Theme Name: Twenty Fourteen Child
Theme URI: http://example.com/twenty-fourteen-child/
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfourteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fourteen-child
*/

@import url(“../twentyfourteen/style.css”);

/* =Theme customization starts here
————————————————————– */

  •  Open your child theme folder and create a new text file called style.css.  Open the style.css file with your php editor, like notepad++ and paste into that file the code contents that you just copied to your clipboard (that is, paste the above code to the style.css file) and save the file contents of style.css.
  • You can modify each of the lines in the style.css file.  The required lines are the theme name, the Template, and the @import url line
  • Theme customization begins below the dashed line — like css changes.
  • Note: The child theme’s stylesheet is included after the parent theme’s and, consequently, the child theme styles will override those in the parent theme’s stylesheet.
  • Activate your childtheme in your wordpress administrative panels — Appearance — Themes.

You can override main content theme with your child theme content as follows.  For example, to remove or change the contents of the wordpress footer “Proudly Powered by WordPress,” you would first make a copy of footer.php (copied from the main theme folder and pasted into your child theme folder).  Open your child theme copy of the footer.php file using Notepad++ editor and edit the code.  Save the modified footer.php file.  Refresh your wordpress site and check your changes.

Print Friendly, PDF & Email