The correct format for a Child Theme?
-
Just tried making a new child theme for the HappenStance theme. Please tell me if it looks right. It seems to be functioning properly, but I don’t want to take any chances of it breaking down or updating and all my work being erased.
/*
Theme Name: HappenStance Child Theme
Theme URI: https://rapforthemoment.com/happenstance-child-theme/
Description: HappenStance Child Theme
Author: Jeff Arnold
Author URI: https://rapforthemoment.com
Template: happenstance
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: happenstance-child-theme
*/@import url(‘../happenstance/style.css’);
———————————————–
I also made an functions.php file with this code:
<?php
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_styles’ );
function enqueue_parent_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}———————————————–
Does everything seem to be in order? My website is rapforthemoment.com. Child Theme is currently running. At least what I think is my perfected child theme.
- The topic ‘The correct format for a Child Theme?’ is closed to new replies.