A few days ago I created a child theme of my theme zerif lite. Everything is looking good and there is no problem at all.
I just want to know are the created functions.php
and style.css
files correct or not. And I added some optimized files in my child theme which are already exist in parent theme (Unoptimized but same files), but i am in doubt that same files are loading 2 times from parent and child theme. I want to be sure that same files not load 2 times.
This is my style.css of child theme:
/*
Theme Name: Zerif Lite Child
Theme URI: http:/only4gamers.ml
Description: Zerif Lite Child Theme
Author: Md Umar
Author URI: http:/only4gamers.ml
Template: zerif-lite
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: zerif-lite-child
*/
and this is function file of child theme:
<?php
function my_theme_enqueue_styles() {
$parent_style = 'zerif-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>
I am new to wordpress and don't know much about coding. Any improvement in my style and function file is highly appreciated.