Creazione del child theme
Il tema parent è Incubation.
Quando sarà finita la fase di sviluppo i due temi verranno uniti con la creazione di un tema specifico.
Il tema child eredita i fogli di stile e le funzioni del theme-parent tramite funzione inserita nel file functions.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' );
wp_enqueue_style('main', get_template_directory_uri() . '/assets/css/main.css');
}
E viene definito dal foglio di stile contenuto nella cartella child.
/*
Theme Name: incubationchild
Theme URI:
Author:
Author URI: https://github.com/ascali82/
Template: incubation
Description:
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: _incubationchild
Tags:
*/