Skip to content

Instantly share code, notes, and snippets.

@michelefenu
Last active October 1, 2020 09:46
Show Gist options
  • Save michelefenu/6791e9187e3832b9a4a7b2440b8fa8fa to your computer and use it in GitHub Desktop.
Save michelefenu/6791e9187e3832b9a4a7b2440b8fa8fa to your computer and use it in GitHub Desktop.
Wodpress Child Theme
  1. Create a new directory inside wp-content/styles and name it parentthemename-child
  2. Create a file style.css using the snippet provided in this gist
  3. If you want to append the parent theme stylesheet copy the file functions.php in the same directory
<?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' );
}
/*
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