To create a child theme in Wealthy Affiliate, go here...

This tutorial is to create a child theme using cPanel - (i.e. not hosted at WA).

If you want to make major changes to your Wordpress site, which requires editing php files, you should use a child theme. It's not difficult to setup, and is well worth the effort.

Being able to have complete control over the design of your theme's styling and functionality is beneficial in the long term.

So, don't be tempted to adjust the style.css or any other .php files in the parent theme, as your changes will be lost whenever the theme is updated.

Don't be frightened over html and css, they are both easy to learn, and of course there's loads of help here at WA as well as elsewhere to learn the basics to get you started. The more you do, the better you'll become!

Let's go and create our child theme...



Join the Discussion
Write something…
Recent messages
TravelCarrot Premium
Also, I am not seeing my new child theme in WP next to the parent... I followed all of the instructions exactly... is it supposed to just "automatically" appear?

EDIT: Okay, I found it! Turns out I had the capitalized my theme when it wasn't supposed to be :)

STILL one problem! Although all coding is now correct, it has not correctly copied my current theme.. for example, it is showing an old logo from a month ago ? Amongst other things. What would be the reason that it didn't copy the most recent version? (Understanding that these issues are unrelated to custom CSS)..

Any help appreciated!
Thanks,
Jen
Reply
Labman Premium
check to make sure the spelling in your child theme reference is accurate. It will load the most current version that is on your site. So, if you have updated the parent theme, the child should see that.

You do need to keep the parent theme updated and current.
Reply
TravelCarrot Premium
I have checked and the spelling is correct. I also have the most recent update installed of my theme. I'm wondering is this supposed to be instant, or in some cases could it take a while for things to propagate?
Reply
TravelCarrot Premium
So to make sure I understand this correctly, does this mean that I will essentially be running my child theme at the same time as the parent (2 themes at once)?

Thanks so much!
~Jen

EDIT: Answering my own questions once again!
Rather than keeping it to myself... I will share in case others are curious about this as well..... The answer is no, it does not run simultaneously, only the child theme will be active... it does not require both, and in fact I think it would be impossible to run them both at once. After all is said and done, I do feel like I asked a silly question :)
Reply
Labman Premium
Actually, the parent theme is referenced by the child theme. It is loaded first, then the child theme overwrites any adjustments that it makes. So, essentially you are running the child theme over the parent.
Reply
TravelCarrot Premium
Oh okay, I see. So the parent theme essentially does need to be present, it will just not "technically" be activated. It must be present to be appropriately referenced by the child. Makes sense...thanks Labman!
Reply
Labman Premium
Yes, the child theme will not work without the parent and the parent needs to be kept up to date. The child loads changes and gets around the parent resetting changes to the theme when it updates.
Reply
ShirleyNot Premium
Good morning! I followed the instructions in your last lesson to install the child theme, but when I activated it, none of the style was there - just my content and pictures, with ugly looking links. What did I do wrong?
Reply
ericcantu Premium
Totally off subject, but it's midnight here in texas. Great to see so many here globally working towards the same goal. (Sorry i stepped in while you're infinitely frustrated with your theme).. don't mind me.. ill just slowly walk away ;)
Reply
rob3 Premium
Hi Shelly,

Are you quite sure that you entered in the correct @import statement, i.e. did you refer to the right template name. That's where many folks fail, they don't have the right name or don't reference it properly. And, don't forget, it's all case sensitive!

All the child theme 'style.css' file is doing is pointing itself to the parent 'style.css' file.

Double check and good luck!
Reply
LenaMiglena Premium
Actually, I did Live Preview of my Child Theme and I do not want to activate it as it did not pick up any changes I made before on my website. It was the original looking theme before the changes I made. What am I doing wrong?
Reply
rob3 Premium
Hi Lena,

When you've created your child theme, you are starting with a blank canvas as it were - all original styling.

So, what you need to do to get all the changes you've already made to your original theme's stylesheet is to copy the custom css over from it and paste it into your new style.css stylesheet.

Good luck with it!
Rob
Reply
LenaMiglena Premium
Thank you, Rob! How do I copy the custom css over? Sorry, I am still learning:(
Reply
rob3 Premium
It's just copy & paste!

Go to your style.css (or wherever the special custom css is within your theme). Select all the css you have customized, then paste it into your new stylesheet in your child theme.
Reply
LenaMiglena Premium
Thank you very much for this training. So I have my Child Theme setup now and I am in about to activate it. Few questions, though. Is there a chance my site would crash if I haven't set the Child theme correct, if yes then do I just deactivate the Child theme and check? Also, I am not very tech savvy so if I want to do any styling I have to have proper coding to do that, though, right? As looks like I have to do it using the style sheet.
Reply
Alasani Premium
Thanks very much for these guidelines!

Great job!
Audrey
Reply
rob3 Premium
Thanks for the heads up, Audrey. Glad to be of help.
Reply
AriefWibowo Premium
LOL.. I missed that part where you really need to put the name "style.css". I put my own name "custom.css". You said it was changed to avoid confusion, but it did confuse me when uploading the file.
It said i don't have the style.css file. Then it hit me.

Now I do have a child theme. Thank you!
Reply
Harrysastar2 Premium
Hi Rob, thanks, great training. I have to edit the style sheet every time I update my theme, so a Child Theme would be really useful, bookmarked.
Reply
ladyluck2013 Premium
Hi Rob,
I followed your lessons as closely as possible using FileZilla and notepad for creating my child theme, but when I went to activate my child theme (I'm using the Fictive theme), a only see the parent theme under the Appearance<Themes choices. Right now, I made the changes to my style.css file under the parent theme, which I know will be overridden when the theme gets updated by Wordpress. What did I do wrong, and how do I fix this?
Deidre
Reply
rob3 Premium
Hi Deidre,

Check that your new css file is in the correct location. Have a look here: It's usually something quite simple, so also double-check that your @import code in your custom stylesheet is correctly referencing the parent theme.

Good luck!
Rob
Reply
ladyluck2013 Premium
Hi Rob,
I was able to fix the directory setup because I had it wrong. I now have it set up as in Image #1. However, when I get ready to activate the child theme in wordpress, I keep getting the error message, "theme is installed but incomplete--stylesheet is missing". I think I have something set up wrong with the @import code. This is how I have the import code set up as in Image #2. What needs to be corrected? Thanks.
Deidre
Reply
rob3 Premium
Hi again Deidre,

You are nearly right!

1. The directory is in the correct location.

2. The @import statement is wrong and you do not have the Template name included.

What you need to do is to add the following after the Description reference (all other descriptions are OK - I've just not entered them in):-

/*
Theme Name:
Theme URI:
Author:
Author URI:
Description:
Template: fictive
Version:
*/

*/
@import url('../fictive/style.css');

/* Theme customisation starts here
----------------------------------------------------- */

I hope this works for you. If you still have issues, then check all names are referenced accurately and named properly - everything is case-sensitive.

Regards
Rob
Reply
ladyluck2013 Premium
Hi Rob,
This is really frustrating for me-- I entered everything according to what you said, and I still keep getting the error "theme is installed but incomplete--stylesheet is missing". I can't figure out what is wrong with my import code. Maybe you can. See attachment below. Can I instead just create a duplicate fictive parent theme, and make changes to the style.css file and rename the theme "fictive-child"? If not, should I consider using a child theme plugin as another WA member suggested in a previous post sometime ago?
Deidre
Reply
rob3 Premium
Hi Deidre,

I'm sorry you are having so many problems.

Remember I mentioned before that everything is case-sensitive? Well, I think I see your issue. I have just looked up about the Fictive theme to see that it is named 'Fictive' not 'fictive'.

So, just replace the lowercase 'f' with an uppercase 'F' in the Template name and @import statement. Then all your entries should be OK.

Keep on truckin' and don't lose heart!

All the best,
Rob
Reply
ladyluck2013 Premium
Hi Rob,
Sorry to keep bothering you, but I did as you said, and I'm still getting the error "theme is installed but incomplete--stylesheet is missing". When I look at your import statement in the tutorial, it looks as if the @import url is written as "@import.url". Should it just be only a space or a period between the @import and url ?
Reply
rob3 Premium
Hi Deidre,

It's a space between @import and url.

Your import statement should be:
@import url('../Fictive/style.css');

All the best,
Rob
Reply
Carriedaway Premium
HI Rob, I am fairly new here and a bit confused. Before coming across your training all I wanted was to get another theme for my site. All I did was go and download a new one called Family and it said that it needed a parent theme to operate- Omega. Then I installed and activated it. Do I need to go through the process you outlined?
Reply
rob3 Premium
Hi Carriedaway,

No, you don't! You have both your child theme and its parent activated, so good to go.

This training is for themes that have no parent theme associated with them, whereby you have to create a bespoke child theme for your personal customizations.

Hope all goes OK for you!

Rob
Reply
Carriedaway Premium
Oh, I understand. Thanks Rob
Reply
RJScot Premium
Hi Rob. Thanks for this training. I need to set a child theme for my website as there are a couple of changes needed in the css file that keep being lost every time it gets updated.
Reply
rob3 Premium
Good luck with it. It's the sensible route to go!
Rob
Reply
JanineKruger Premium
Awesome, thanks so much!
Reply
MarionBlack Premium
Thank you Rob for this most useful information. Because of your training I was able to create a child-theme before I asked the question: https://my.wealthyaffiliate.com/everything-wordpress/how-do-i-remove-html-code-under-comments-box/comment/2529697 so I was able to choose the most appropriate answer to my question and resolved the problem. ~Marion
Reply
rob3 Premium
Hi Marion, I'm pleased you found the information useful. Once you learn how to use child themes, the sky's the limit when it comes to website design.
Reply
MarionBlack Premium
I'll start experimenting soon because I don't like the default typefaces on most themes, especially when they change to a serif font in the middle of a sans-serif paragraph because you add a hyperlink (Supernova theme). Grrrrr.
Reply
mackiejw Premium
Hi Rob, you may be able to give me a hand.

I want to create ONE full width page and NOT display Header, Menu and Page Title. Do you know a way to do that? Would appreciate your expertise. :-)
Thanks
John
Reply
rob3 Premium
Hi John, can you send me the link to your site for this? What theme are you using?
Reply
mackiejw Premium
Hi Rob, You lost me at

Step-By-Step

1. Open File Manager > navigate to wp-content > themes folder.

Where the heck is the File Manager? How to get there?

Thanks
John
Reply
rob3 Premium
Hi John,

This tutorial is specifically for creating a child theme through cPanel and not through WA hosting.

If your site is hosted elsewhere, say with GoDaddy, Namecheap or anywhere else, you will access your files through their cPanel. When in cPanel you'll see a load of icons and one of them is File Manager.

I'm in process of creating a training tutorial for those only using WA hosting - it should be out in a few days time.

Hope this helps!
Rob

15 Aug - New training up at https://my.wealthyaffiliate.com/training/how-to-create-a-child-theme-in-wealthy-affiliate
Reply
mackiejw Premium
Thanks for the clarification
John
Reply
cotati4 Premium
Thanks Kohn, Looking forward to this.
Reply
chaimb Premium
Hi Rob,
I have created a child theme directory for the Twenty Ten theme, pedanticly created the style.css file (using Notepad++ under FileZilla), but the child theme doesn't appear anywhere under Appearance ---> Themes !
What could I have done wrong?! I have tried different variations of the @import line in style.css , with and without the single quotes, a full pathname and a partial one using "../" - and the new child theme is just not visible anywhere!
Chaim
Reply
davyrobot Premium
Hi Chaim! -

Unfortunitely I can't answer your question - but I am sure Rob or another member will be alone soon!

I am Now Following You!

** Have A Great Productive Day! **

David

"A Journey Of A Thousand Miles Begins With A Single Step" - confucius
Reply
chaimb Premium
Thanks all the same David! And thanks for the follow!
Reply
davyrobot Premium
Hi Chaim! -

You are most welcome! :)
Reply
rob3 Premium
Hi Chaim,

Sorry to hear that you're having a bit of trouble. Child Themes can be very fickle sometimes!

If you can't see your new child theme I would say that there is an error in your reference code at the beginning of the style.css file. The new css file is not being associated with its parent file, so double check all that important stuff on page 3 here.

If you cannot fathom it out, send me a PM with the code that you have and I'll try and work it out.

Good luck!
Rob
Reply
chaimb Premium
Thanks Rob - just figured it out! I had put the child-theme directory under the parent theme directory, instead of under the Themes directory! I just saw your new tutorial and the screen shot, and that pointed out my mistake! Thanks!
Chaim
Reply
MarianMartin Premium
You can also use a plugin to create a child theme in one click. This works great and requires no coding or file transfer: http://wordpress.org/plugins/child-themify/

I hope this helps.
Reply
rob3 Premium
Hi Marian. I had heard of this plugin before, but I'm trying to use fewer plugins, as they do tend slow down a site's loading time. They can also cause conflicts with other plugins.

I would prefer to create a child theme this way, but each to his or her own.
Reply
MarianMartin Premium
You are right right Rob, the loading time may be a bit longer. But for newbies without any CSS experience the whole process could be too complicated. That´s why I mentioned the plugin, to ease the progress. Best wishes, Marian
Reply
Jonicas Premium
Hello Rob,

Thank you very much for this training, it is bookmarked and I will be using it to customize my template files specially the Style.css which to my mind is always an utter mess for every theme chosen, either the text is too small, line spacing too high, etc a myriad of "issues".

To Our Success Online,
Jonicas
Reply
rob3 Premium
Thanks so much Jonicas.

I agree, most themes need a little tweaking at some point or other. I have never NOT had to change some css on any WP theme ever. Also, we all want to be a little different to other people's sites who happen to be using the same theme!
Reply
jko2013 Premium
Hi Rob, so I created the child theme, but if I want to go in and edit something in the page.php file, how do I do that? when I click on editor in the child theme all of the editor options are gone except for sytle.css. I am trying to remove the comments from my pages, I only want comments on posts. I figured out how to do it on my parents theme, but when I updated my theme today the changes disappeared, that's when i realized i needed a child theme, but I'm not sure how to make the changes on a child theme. Can you help me? Thank you!! I loved your training by the way, very easy to follow!
Reply
rob3 Premium
Hi Jill! The child theme is there so that you don't have to edit ANY of the original .php or css pages. By working in your child style.css stylesheet only, you can customize away to your heart's content.

If you want or need to customize any of the .php files, i.e. the header.php or functions.php, you must first copy them into your new child theme, and do the editing there.

As regards your issue with comment removal from pages, all you need to do is this: http://www.wpbeginner.com/plugins/how-to-turn-off-or-disable-comments-in-wordpress-pages/
Reply
jko2013 Premium
Thank you! So when you say to copy header.php or functions.php into the child theme, do I do that the same way we set up the style.css in your training?
Reply
rob3 Premium
Hi again Jill! Yes, you create a new php file in your child theme and name it header.php, functions.php or whatever, then copy everything from the parent php file and paste into this new one. Now you can edit away in your child theme's version and not worry about losing stuff when you update the parent theme.

Hope this answers your question ok?
Reply
jko2013 Premium
Yes it did!! Thank you so much for your help.
Reply
rob3 Premium
Well done!
Reply
Mrrandom Premium
The lines the created by the plugin are the same ones I made manual except for a unicode line so I don't know why mine did not work. The automated file is even in the httpdocs directory. I will look at what I did later on to try to find out why my file did not work.
Reply
Mrrandom Premium
Yes. I found my theme folder and I put the child theme folder in the same directory as the theme it is copying. As an if example if my directory was "Themes/primary theme" then I used "Themes/child theme".

Then in the "child theme" folder I created the css file, and I put the following:
/*

Theme Name: Twenty Fourteen Child Theme
Theme URI: http://theonlinebusinessguide.com/httpdocs/wp-content/themes
Author: Adrian Sawyer
Author URI: http://theonlinebusinessguide.com
Description: The new child theme of Twenty Fourteen created by me.
Template: twentyfourteen
Version: 1.7
*/

@import url('../twentyfourteen/style.css');

/* Theme customisation starts here
----------------------------------------------------- */

Maybe that "httpdocs" should be replaced but that is what Filezilla showed me.
Reply
rob3 Premium
Don't touch 'httpdocs', that's the root of your site.

I see you've just discovered a plugin, I haven't tried it yet. I expect it only does the style.css stylesheet. This manual way you can customize headers, footers, functions and any other .php templates.
Reply
Mrrandom Premium
I got--> "The following themes are installed but incomplete. Themes must have a stylesheet and a template."
Reply
rob3 Premium
You might need to re-install your theme. Were you making a child theme, and if so did you follow the method above? Many people fail to either put the child theme css in the correct place, or get the linking right as on page 3.

Hope you get it sorted ok.
Reply
Wayne Wallace Premium
Thanks, i installed my first child theme!
Reply
Funandeasy Premium
Thanks Rob, it helped me a lot. The only thing is I am using filezilla and there I cannot find code editor, but I succeeded all things before in your tutorial. I tried to find tutorial on youtube, nothing, so please if you know help me with it. If not I will ask further.
Thanks a lot.
Milena
Reply
rob3 Premium
Hi Milena, you say you're looking for a code editor on FileZilla. This is a FTP program - File Transfer Protocol, which means that it is a way to upload and download files from and to your computer. It's nothing to do with being able to edit stuff.

Think of it as a double Explorer/Finder window - you see the local files and directories on the left, these are the ones on your computer; and the remote files and directories on the right, these are on your hosting server.

When using FTP rather than cPanel, you edit the code locally (on your computer) in any code editor, then upload it to your server.

Maybe I should think about creating a tutorial on it!

Hope you understand it ok?
Reply
Funandeasy Premium
Thank you Rob, I found tutorial somewhere on Google and I made it through notepad++. Now I have Hueman child theme. I have one question, when I go to editor on Theme options there is only things I wrote and empty, all the rest is on the side to click(from parent theme). Is that ok? When I want to change something I will have to go there and edit or copy paste on child then edit? Sorry to bother you.
Thanks again!
Milena
Reply
rob3 Premium
Now you have a child theme, you make all your customizations there - don't edit anything in the parent theme's css stylesheet. All the code you write in your child theme now takes precedence over the code in the parent theme.

So, say if for instance you want to change the color of your title tag, just write the css code and it's done!

It works because the child theme's style.css is loaded after the parent theme's style.css, so that's when the updates or changes are made.
Reply
Funandeasy Premium
Thanks Rob, that helped me a lot. There are plenty to read everywhere and I will menage. I am learning really a lot, becoming pro:-)
Thanks!
Reply
azuree19 Premium
Thanks Rob very helpful. I wouldn't figure this out even it takes me a whole year! lol
Reply
MmmmBalf Premium
Hi Rob, looks great. WA (where I assume many of us have our websites hosted) doesn't offer cPanel. Is it as easy to do using FTP?
Reply
rob3 Premium
First you need to have an FTP program on your computer - go here: https://filezilla-project.org/ to download FileZilla, it's one of the best and free!

Next, on loading FileZilla, you'll need your hostname, username and password to connect to your hosts server. Don't worry about the port unless your login info specifies one.

Have a look at FileZilla's own tutorial at: https://wiki.filezilla-project.org/FileZilla_Client_Tutorial_(en).
The interface is just like having two Explorer windows side by side - the Local (files on your computer) on the left, and Remote (files on the server) on the right.

You can create files and folders locally then upload them to the server.

Great video on FTP - https://my.wealthyaffiliate.com/training/ftp-filezilla-connecting-to-domain-via-ftp
Reply
MmmmBalf Premium
Thanks Rob. I'll have a play around with it. At this stage I can't seem to log in. I just get an error message saying unable to connect, server timed out. Does it every time.

I was following the instructions in the WA video you linked.
Reply
Trialynn Premium
This is wonerful Rob! It is bookmarked!
Reply
malric Premium
thank you rob i havent been game to try,hoeever, now you have explained the child theme gives control great.As PINK FLOYD said"Set the sights for the heart of the sun"
Reply
acoolmil Premium
Very impressive Rob, I will be coming back to this later.
Reply
Yogie Premium
where is cpanel file manger?
Reply
rob3 Premium
Hi Yogie,

cPanel is something not connected with WordPress. You should have been given login details to it by your web host. Check to see what control panel they offer. If you still have your sign-up documentation, check that to see where to find your control panel. Otherwise, ask your host.

If cPanel is available to you you should be able to access it via your domain name + "/cpanel" (no quotes). Fill in your admin name and password (included with your documentation) and hit enter. That will take you to your cPanel, where you can get access to loads of stuff.

I hope this makes it clear. I will add this into the tutorial, thanks for asking!
Reply
Yogie Premium
Thank you for your details explanation I really appreciated.
Reply
Karyskis Premium
Wow! Great training.
Reply
Wayne Wallace Premium
Thanks I'll be looking at this
Reply