Support » Theme: Encounters Lite » White screen of death when trying to setup a childtheme

  • Hi
    can you please tell me whats wrong on this functions.php?
    I cant make my childtheme work with your theme.

    Tried in several versions, but none worked:

    <?php
    function my_theme_enqueue_styles() {
    
        $parent_style = 'encounters-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    ?>

    Version 2:

    <?php
    /**
    * Child theme stylesheet einbinden in Abhängigkeit vom Original-Stylesheet
    */
    
    function child_theme_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style'));
    
    }
    add_action( 'wp_enqueue_scripts', 'child_theme_styles' );?>"

    Here is the CSS header:

    /*
    Theme Name: encounters-lite-child
    Description: Childtheme
    Author: Max Mustermann
    Author URI: http://example.com
    Template: encounters-lite
    Version: 1.0
    Text Domain:  encounters-lite-child
    */

    The folders name is “encounters-lite-child”

    So it seems as everything were correct.
    Axel

  • You must be logged in to reply to this topic.