Welcome to WordPress Child Theme Tutorial Creation. Here are some of the benefits to creating a child theme in WordPress.
#childtheme #php #php-lessons
Why Create A WordPress Child Theme?
- It takes less time to create.
- You can take advantage of parent theme functions.
- You can take advantage of parent theme CSS styles.
- You can also use the parent theme JavaScript.
- You can use the already made pages from the parent theme like:
- category.php page
- tag.php page
- single.php page
- page.php page
- and more! :-)
Preliminary Steps to Creating a WordPress Child Theme
This tutorial will be easier to follow if you install WAMP if you are on a PC. If you are on a MAC then you want to #xamp-for-macintosh" target="_blank" rel="noopener noreferrer" contenteditable="false" style="cursor: pointer;">install XAMP.A Good HTML Editor
We will be using #notepad-plus-plus-or-notepad-" target="_blank" rel="noopener noreferrer" contenteditable="false" style="cursor: pointer;">notepad plus plus for this tutorial. It is free and can be used on PC's. However if you are using MAC then I suggest that you download Textmate.Step #1 WordPress Child Theme Creation Tutorial
The first thing that you want to do is go to WordPress.org and download the latest version of WordPress.


Step #2 WordPress Child Theme Creation Tutorial Folder Arrangement
Navigate to your www folder in your WAMP. Make sure that you leave that folder open that has all the files. Create a new folder in your www folder. We will call this folder "child" to keep it simple. Then drag and drop all the WordPress files into the "child" folder.

Step #3 WordPress Child Theme Creation Tutorial Make Database
Now we need to create a database for WordPress to use. Make sure that your WAMP or XAMP server is running on your computer. Go to http://localhost/ in your favorite browser. {you should go right there if you click on the link ;-)}You will come to a page that looks like this.

Step #4 WordPress Child Theme Creation Tutorial Installation Process
Now go back to your localhost and look for "child". Click on it when you see it.


- Database name should be child like the graphic below.
- The username for WAMP is root all lowercase letters.
- The password will be nothing, leave it blank. I have a special setup on my system where you have to use pass as the password. If you set up a password to use your databases you will have to use it here.
- Database host will be localhost.
- Give the Table Prefix a unique name and don't forget the underscore at the end _. We named our table prefix wpchild_.






Step #5 WordPress Child Theme Creation Tutorial Picking The Parent Theme
Usually a web developer will have some type of mockup. This is an image of what the client wants their theme to look like. For parent themes I like to use one of the themes that come with WordPress. Depending on the mockup I try to see what parent theme matches it close. I will worry about editing the files and styles later. We are going to use Twenty Thirteen as our parent theme for this project. This also means that we are going to delete all the other themes that are included with the download. Navigate to http://localhost/child/wp-admin/themes.php or in your dashboard go to "Appearance", "Themes". You will see this. Activate twenty thirteen by clicking on it.




Step #6 WordPress Child Theme Creation Tutorial The Style Sheet
We are now ready to start the coding process for child themes. Go to your folders in your WAMP server under www. Find the child folder that we created. Open the wp-content folder.



/* Theme Name: My Child Theme Theme URI: https://a1websitepro.com Description: This is a cool child theme I made with Maximus McCullough Author: Maximus McCullough Author URI: http://maximusmccullough.com Template: twentythirteen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: cool child theme Text Domain: twenty-thirteen-child */Now go to your themes in your dashboard and you will see another theme in there.


Step #7 WordPress Child Theme Creation Tutorial The Functions.php file
When you look at the front end of the website it will not look right. It will look something like this. This is because we have to enqueue the scripts.
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); }After you put the functions.php file in then your parent theme will respond correctly. Take a look at the front of the site after you save your functions.php file.

Step #8 WordPress Child Theme Creation Tutorial Editing the Style Sheet
Now we can start editing the style sheet to how we want the website to look. You will start adding CSS codes after the closing CSS comment line#339966;">*/. Add the following CSS codes to your stylesheet.css. Make sure that you save every time in your editor so you can see the changes on the website.
html, body{ font-size:55px; } .nav-menu li a { color: red; display: block; font-size: 25px; line-height: 1; padding: 15px 20px; text-decoration: none; }You will notice that you fonts are larger and your menu is red.
