• Coen

    (@cvansomeren)


    Hi,

    I’m using a child theme, works fine, except of displaying in the Appearance, Themes window: there it shows an empty image.

    My style.css has:

    /*
     Theme Name:   Twenty Fourteen Child
     Description:  Twenty Fourteen Child Theme
     Template:     twentyfourteen
     Version:      1.0
     Text Domain:  twenty-fourteen-child
    */

    My functions.php has:

    <?php
    
    /*
     Theme Name: Twenty Fourteen Child
     Template:   twentyfourteen
    */
    
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    	wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    	wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
    }
    
    ?>

    I read a lot about it elsewehere on the forum, but found no solution.
    Any suggestions?
    Regards and thanks, Coen

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You mean it just hasn’t got a thumbnail for your child theme?

    The preview image is taken from a file named screenshot.png in the child theme’s folder.

    Thread Starter Coen

    (@cvansomeren)

    @ andrew: yes indeed.
    @ stephencottontrail: I haven’t read anything about this before. Do you mean to copy this file from the parent to the child (that works :-), thank you), or is it possible addressing it without copying the whole file?
    Both of you: thanks for the fast reply. Coen

    It doesn’t matter all that much. You can copy the file from the parent theme if it’s easier, but if you’re planning on making extensive modifications to the theme, it might be better to take a new screenshot. As long as the file is named screenshot.png, WordPress will use it as the preview image.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Appearance of Child Them’ is closed to new replies.