Create A WordPress Child Theme Within The Next Half Hour | WP Learning Lab

Grab Your Free 17-Point WordPress Pre-Launch PDF Checklist:
Download our exclusive 10-Point WP Hardening Checklist:
Create A WordPress Child Theme Within The Next Half Hour | WP Learning Lab

add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

In this tutorial I’m going to show you how to create a WordPress child theme.

Why would you want to create WordPress child themes? That’s a good question. WordPress child themes allow you to make changes to your active WordPress parent theme. When that parent theme is updated, your changes are not overwritten because they are in the child theme.

This is a WordPress customization that will get you more familiar with how WordPress themes work and give small peak into how to build a WordPress theme.

Just has an FYI, using a WordPress child theme works with parent themes that have WordPress theme frameworks.

To create child theme the first thing you have to do is log into your hosting account cPanel or log into your site via FTP. Once in the cPanel, open the File Manager for your website.

Next, double click on the wp-content folder, then double click the themes folder.

Inside that folder you will create a new folder and name it after the parent theme name. For example, in the tutorial we make a child them for the Avada theme. The Avada theme folder is called “Avada”. So we called the child theme’s folder “Avada-child”.

Once you’ve created the new folder, double click it to open it. Then create a new blank file called “style.css”.

Now go into the parent theme folder. Find and open the style.css file. Highlight and copy the first part of the file where the theme information is.

Close that file and go back to the style.css file you created inside your child theme folder. Open that blank style.css file and paste in the text you just copied.

You will need to change the “Theme name:” to something like “Avada Child”. Then you will add a new line and type “Template: ” without the quotation marks. After Template type in the exact name of the WordPress parent theme folder. Type it exactly with the same. This is case-sensitive.

After you’ve completed those two things click on “Save Changes” and you’re done.

Go back to your child theme folder and create a new file called functions.php. Inside that blank file, open a PHP tag and paste in the code below:

add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );


Then save changes. Now go back to your WordPress dashboard, go to Appearance then Themes. You will now see a WordPress child theme; activate it.

Go to your website and you’ll see it looks the exact same as before, which is what we want. You can now make edits to the style.css in the child theme to change how the site looks. When the parent theme is updated all of your changes are still in effect.

I hope this information helps you completed this WordPress customisation! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter.


If you want more excellent WordPress information check out our website where we post WordPress tutorials daily.

Connect with us:

WP Learning Lab Channel:



Google Plus:


Fuente – Source

Create A WordPress Child Theme Within The Next Half Hour | WP Learning Lab

Necesitas ayuda con wp? Entonces WPVideo es tu sitio.
Encuentra lo que buscas entre cientos de miles de videos y experiencias personales de otros usuarios. Todos los que empezamos con wp deberíamos tener acceso a esta web, ojalá yo hubiera tenido algo así cuando empecé mi camino como webmaster 🙂
Pero ahora quiero y puedo poner esta web a vuestra disposición.
Disfrutadla 😉

Need help with wp? Then WPVideo is your site.
Find what you are looking for among hundreds of thousands of videos and personal experiences of other users. All of us who started with wp should have access to this website, I wish I had something like that when I started my journey as webmaster 🙂
But now I want and I can put this website at your disposal.
Enjoy it 😉

Publicado en Temas (Themes), Tutoriales (Tutorials), Wordpress y etiquetado .

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *