• Pru123abc

    (@pru123abc)


    Hello ??

    I need help with creating a child theme with Filezilla. I tried creating one, the right way, with a style.cc file and a functions.php file. But wordpress is saying:
    “matchbook2 child; The parent theme is missing. Please install the “matchbook2;” parent theme”.

    So I reinstalled the parent theme via wordpress and not via filezilla, but I still get the same message. “The parent theme is missing. Please install the “matchbook2;” parent theme. “

    Do you think my theme equipped to allow child themes ? Or is my problem that I am using windows notepad to edit style.css files ?

    This is what I wrote this in my child theme’s style.css:

    /*
     Theme Name:   matchbook2 child;
     Theme URI:    https://wordpress:8888/;
     Description:  This is a child theme;
     Author:       Pru;
     Author URI:   https://prunellechamaret.com;
     Template:     matchbook2;
     Version:      1.0.0;
    */

    and this in my child theme’s functions.php

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
    function enqueue_child_theme_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
    }

    Here’s my website address: https://www.prunellechamaret.com/#/sample-page

    Thanks again for your help !
    Pru

Viewing 4 replies - 1 through 4 (of 4 total)
  • With a child theme you’ll need to have the parent theme uploaded on your site as well. In this case, it appears you’re trying to use matchbook2 as the parent theme.

    That error generally indicates that the parent theme is missing – do you have matchbook2 on your website?

    Thread Starter Pru123abc

    (@pru123abc)

    Hello ahockley ??

    Thanks a lot for your answer.
    I decided to start from scratch once again.

    1/I activated my matchbook2 theme in wp-admin. (Although I installed matchbook2 via wp-admin, it still appears in filezilla.)
    2/In filezilla, I went to :
    myusername–>prunellechamaraet.com–>wp-content–>themes
    I creatted a new directory: “matchbook2-child”
    3/Inside that new file I created two files which I edited with my windows notepad.
    style.css and functions.php
    The codes I used are:

    style.css

    /*
    Theme Name:   matchbook2 child;
    Theme URI:    https://wordpress:8888/;
    Description:  This is a child theme;
    Author:       Pru;
    Author URI:   https://prunellechamaret.com;
    Template:     matchbook2;
    Version:      1.0.0;
    */

    functions.php

    <?php
    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
    function enqueue_child_theme_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
    }

    But wordpress still says that “The parent theme is missing. Please install the “matchbook2;” parent theme.”

    Am I doing something wrong ?
    Thanks for your help ??
    Pru

    Ah, I think the problem is the semicolons at the end of the lines in your css file – specifically the one on the “Template” line. Get rid of the semicolons and you should be good.

    Thread Starter Pru123abc

    (@pru123abc)

    Thank you Ahockley, removing the semicolons allowed for my child theme to appear in my wp-admin themes menu. ??
    I have activated it but my website doesn’t look quite right. It seems there was a problem with importing my parent’s style.css sheet.

    Here is what is displayed on my website:

    “Warning: include_once(): Failed opening ‘/home/myusername/Prunellechamaret.com/wp-content/themes/matchbook2-child/includes/stop-ie6/stopie6.php’ for inclusion (include_path=’.:/usr/local/lib/php:/usr/local/php5/lib/pear’) in /home/myusername/Prunellechamaret.com/wp-content/themes/matchbook2/functions.php on line 32

    and

    Warning: include_once(/home/myusername/Prunellechamaret.com/wp-content/themes/matchbook2-child/includes/stop-ie6/stopie6.php): failed to open stream: No such file or directory in /home/myusername/Prunellechamaret.com/wp-content/themes/matchbook2/functions.php on line 32

    Any idea why this message is appearing on my website ? And why the layout doesn’t look right ?
    Thank you for your hep !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘creating child theme, problem with parent theme’ is closed to new replies.