Today we will learn how to create a child theme in wordpress which is particularly useful in case you need to load extra javascript or css files or your own shortcodes! You will check out all these cool things in my next articles. And if you have any special request, just drop a line with the form at the bottom of the page.

You can also change your login logo and setup code that will run server side ( in the functions.php file we will create just now ), which means before your pages are served by apache (that’s most probably your webserver’s name). The coolest feature though is that you will be able to modify your parent theme’s pages simply by copying them in the child theme folder!

This will be quick… How to create a wordpress child theme!

 

What you’ll need:
Let’s Start
1) FTP LOGIN:

Log into your FTP account with FileZilla by filling in your Host URL, Username and Password and clicking connect

FileZilla
2) FIND THE THEMES FOLDER:

Usually all your website’s data is in /public_html so enter that folder first and then look for the following path:

/wp-content/themes

3) CREATE THE CHILD’s THEME FOLDER:

Now create a new folder and call it whatever you want as long as inside of it you add the following files by right-clicking on filezilla and selecting Create new file:

  • style.css with the following content, the only needed fields are Theme Name and Template
/*
 Theme Name:     <Whatever name you want>
 Theme URI:     
 Description:    
 Author:         
 Author URI:     
 Template:       <Your parent's theme folder name!>
 Version:        
*/
/* =Theme customization starts here
------------------------------------------------------- */

 

  • functions.php and just paste the following lines of code inside of it. This file executes coding stuff on your server before ANY page is served. Yes, the <php tag has no closing:
<?php
function my_theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

 

  • screenshot.png  which can be any image you want and will be displayed right in your themes selection panel in wordpress which you can reach from Appearance > Themes
Themes

That’s it!