What is a Child Theme Wordpress?
The wordpress child theme inherits the parent theme's appearance and feel as well as all of its functionalities, but it may be used to modify any section of the wordpress theme. wordpress customizations are maintained separate from the parent theme's files in this way. You may upgrade the parent theme without impacting the modifications you've made to your site by using a wordpress child theme.Benifilts of Child Theme Wordpress?
- Your customization work will be safe
- Make modifications portable
- Parent themes to be updated without destroying
- Website will be fast load
How to Create a Wordpress Child Theme ?
below follow do some steps for make child theme in wordpress-1. Create a child theme folder
create a new folder in your desktop screen , folder themes same name as the parent and add with -child to the end. exp we are using "twentyfifteen" parent theme, so your folder name will be show on directory "twentyfifteen-child".
2. Create a file stylesheet- style.css
After then create a stylesheet file inside chid-theme name as style.css and copy below code and paste in style.css file.
Theme URI: http://example.com/twenty-fifteen-child/
Description: Twenty Fifteen Child Theme
Author: abc
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: twentyfifteenchild
*/
3. Create a file function- functions.php
After then create a functions file inside chid-theme name as functions.php and copy below code and paste in functions.php file.
function my_theme_enqueue_styles() {
wp_enqueue_style( 'child-style', get_stylesheet_uri(),
array( 'parenthandle' ),
wp_get_theme()->get('Version')
);
}
4. Make a image thumbnail for child theme
create a image for thumbnail name as child theme and save on chid-theme folder.
5. Child theme folder make zip file
6. Upload your child theme
7. Activate your child theme
0 Comments