I have been trying to set up a child-theme in the correct way, as I have custom fonts I need to install (myfonts webkit).
However, it seems to break my theme and there is no documentation available on the site.
So far I have been doing this:
Quark-Child Folder
– functions.php
– style.php
– header.php (this is the place where I have to add in the custom code for fonts)
Functions.php looks like this:
- Code: Select all
<?php
/* Hier kommen die functions für mein Child-Theme */
function Quark_child_styles() {
wp_deregister_style( 'quark-style');
wp_register_style('quark-style', get_template_directory_uri(). '/style.css');
wp_enqueue_style('quark-style', get_template_directory_uri(). '/style.css');
wp_enqueue_style( 'quark-child-style', get_stylesheet_directory_uri().'/style.css', array('quark-style') );
}
add_action( 'wp_enqueue_scripts', 'quark_child_styles' );
And here is the css
- Code: Select all
/*
Theme Name: Quark-Child
Description: Quark-Child
Author: Dirgis
Template: Quark
*/
I assume I have to copy more files from the parent for it to work. Which ones would this concern?