Use provided child theme (new themes)
Our latest WordPress themes include Child Theme ZIP file in theme full ZIP archive. Unpack it and check Child Theme folder.
You can read what is Child Theme and how to use it here.
Create Child Theme manually (old themes):
You can find theme release date in theme description page on marketplace where you bought it.
- Create new folder with name like themename-child, for example if you have Piemont theme you should name your folder piemont-child.
- Copy img/ and inc/plugins/ folders with all files inside to your child theme folder from our theme folder.
- If you have theme released before 25 February 2016:
Create cache/ folder inside child theme folder and check that server can write to this directory (set write permissions).
If you have theme released after 25 February 2016:
Create css/ and js/ folders inside child theme folder and check that server can write to this directories (set write permissions). - Create style.css file inside child theme folder with this content (change themename to your parent theme folder name everywhere):
/* Theme Name: Child of themename Theme URI: Description: Child theme based on themename Author: Your Name Version: 1.0 Template: themename */
- Create functions.php file inside child theme folder with this content (change themename to your parent theme folder name everywhere):
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css' ); wp_enqueue_style( 'themename-parent-style', get_template_directory_uri() . '/style.css', array('bootstrap')); wp_enqueue_style( 'themename-child-style', get_stylesheet_directory_uri() . '/style.css', array('bootstrap')); } ?>
- Upload your child theme folder in /wp-content/themes/ and activate your child theme from Appearance > Themes.
- Go to Theme Control Panel and Save settings to write new cache files to child theme cache folder.
- Now you can add your CSS styles to child theme style.css file and your PHP customizations to functions.php file.
Troubleshooting
If you have problems after migrating from localhost to real server check this.
Comments
0 comments
Please sign in to leave a comment.