- Create a new directory inside
wp-content/styles
and name itparentthemename-child
- Create a file
style.css
using the snippet provided in this gist - If you want to append the parent theme stylesheet copy the file
functions.php
in the same directory
Last active
October 1, 2020 09:46
-
-
Save michelefenu/6791e9187e3832b9a4a7b2440b8fa8fa to your computer and use it in GitHub Desktop.
Wodpress Child Theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' ); | |
function enqueue_parent_theme_style() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Twenty Twenty Child | |
Theme URI: http://example.com/ | |
Description: Tema Child per il tema Twenty Twenty | |
Author: Michele Fenu | |
Author URI: https://michelefenu.dev/ | |
Template: twentytwenty | |
Version: 0.1.0 | |
*/ | |
/* Stili aggiuntivi child theme */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment