Child Theme
Hi,
i try to build a child theme for ClassiPress as described in the tuturial.
But in my backend i get following error massage:
classipress-child: Missing template. Standalone themes must have a template file in templates/index.html or index.php. Child themes require a template header in the stylesheet style.css.
This is the code in in both files:
style.css:
@charset "UTF-8";
/* CSS Document */
/*
Themenname: ClassiPress Beispiel-Child-Theme
Theme-URI:
http://appthemes.com/
Beschreibung: Beispiel eines Child-Themes für das ClassiPress-Theme
Autor: AppThemes
Autoren-URI:
http://appthemes.com/
Vorlage: Classipress
Version: 0.1.0
*/
body, h1, h2, h3, h4, h5, h6 {
Schriftart: "Century Gothic", CenturyGothic, "AppleGothic", serifenlos;
}
functions.php:
<?php
/**
* ClassiPress-Child-Theme-Funktionen.
*
* VOR DER VERWENDUNG: Verschieben Sie das classiPress-Child-Theme in den Ordner /themes/.
*
* @package ClassiPress\Functions
* @author AppThemes
* @since ClassiPress 3.0
*/
/**
* Registriert das Stylesheet für das Child-Theme.
*/
function classipress_child_styles() {
wp_enqueue_style( 'child-style', get_stylesheet_uri() );
// Deaktiviert die ClassiPress-Standardstile.
//wp_dequeue_style( 'at-main' );
// Deaktiviere die Stile des Foundation-Frameworks.
//wp_dequeue_style( 'foundation' );
}
add_action( 'wp_enqueue_scripts', 'classipress_child_styles', 999 );
/**
* Registriert die Skripte für das Child-Theme.
*/
function classipress_child_scripts() {
wp_enqueue_script( 'child-script', get_stylesheet_directory_uri() . '/general.
js' );
// Deaktiviere die ClassiPress-Standardskripte.
//wp_dequeue_script( 'theme-scripts' );
// Deaktiviere die Foundation-Framework-Skripte.
//wp_dequeue_script( 'foundation' );
//wp_dequeue_script( 'foundation-motion-ui' );
}
add_action( 'wp_enqueue_scripts', 'classipress_child_scripts', 999 );
/**
* Diese Funktion migriert Modifikationen des übergeordneten Themes zum untergeordneten Theme.
*/
function classipress_child_assign_mods_on_activation() {
if ( empty( get_theme_mod( 'migrated_from_parent' ) ) ) {
$theme = get_option( 'stylesheet' );
update_option( "theme_mods_$theme", get_option( 'theme_mods_classipress' ) );
set_theme_mod( 'migrated_from_parent', 1 );
}
}
add_action( 'after_switch_theme', 'classipress_child_assign_mods_on_activation' );
Thank you for helping!