Creating a WordPress Child Theme

/*

Theme Name: Swift-Basic Child Theme

Theme URI: http://example.com/swift-theme-child/

Description: Swift Basic Child Theme

Author:

Author URI: http://example.com

Template: swift-basic

Version: 1.0.0

*/

@import url(“../swift-basic/style.css”);

/* =Theme customization starts here

————————————————————– */

Note: The following lines needs to match and its case sensitive:

– Template: The name must be exact name of the parent theme folder

– @import url: the path must be exact same name as parent theme folder

– Its also worth checking the parent theme folder and confirm the name of the css style is same as you have above

– After saving changes, go to your WordPress > Appearance > Themes, locate the new child theme and click on ‘Active‘

Now you have a child theme without using a plugin. Any custom changes you want to implement should go just after the @import line.

You could also create a function.php to load in custom function codes you intend running. Simply create the file ‘function.php’ in the child theme folder, insert your php function and save. Note your child function.php file should start with an open tag and end with a closing tag:

[box type=”info”]

[/box]

When next you load or refresh your page, the child theme php code will load first before the parent php function

 Share!

 
comments powered by Disqus