• Hello,
    I`m trying to get the child theme work, but vainly.

    I used your tutorial for the setup (https://www.shapedpixels.com/support/basic-theme-setup/create-a-child-theme-for-theme-modifications) and placed the child theme folder like this on the server:

    /wp-content/themes/seasonal
    /wp-content/themes/seasonal-child

    Within the seasonal-child folder they are these two files style.css and functions.php:

    <strong>style.css</strong>

    <em>[ Moderator note: code fixed. Please wrap code in the backtick character or <a href=”https://codex.www.ads-software.com/Forum_Welcome#Posting_Code”>use the code button</a>. ]</em>

    /*
    Theme Name: 	Seasonal Child
    Theme URI: 	https://www.shapedpixels.com/free-wordpress-themes/seasonal
    Author: 	shapedpixels.com
    Author URI: 	https://www.shapedpixels.com
    Description: 	This is a blank child theme to use with the Opportune theme whenever you need to make changes to code in the theme.
    Template:     	Seasonal Child
    Version: 	1.0.0
    License: 	GNU General Public License v3 or later
    License URI: 	https://www.gnu.org/copyleft/gpl.html
    Text Domain: 	seasonal-child
    Tags: 		responsive-layout, custom-colors, post-formats, custom-background, featured-images, microformats, theme-options, translation-ready
    */

    <strong>functions.php</strong>

    <?php
    /**
     * Functions and definitions
     * @package Seasonal Child
     */
    
    // Lets begin by grabbing our stylesheet from the parent theme
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    
    // Load our main stylesheet
    wp_enqueue_style( 'senses-lite-child-parent-css', get_template_directory_uri() . '/style.css' );
    }
    ?>

    Can you see the reason why the child theme ain’t working properly? In my wordpress adjustments it says for seasonal child, that the superordinate theme is missing and I have to install the superordinate child theme. Otherwise I won`t be able to use the child theme.

    Thanks a lot in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Shaped Pixels

    (@shaped-pixels)

    In your style.css file, your “template” should be this:

    Template: Seasonal

    …and, although not critical, you may want to rename “senses”

    wp_enqueue_style( 'senses-lite-child-parent-css', get_template_directory_uri() . '/style.css' );
    }

    to “seasonal”

    wp_enqueue_style( 'seasonal-child-parent-css', get_template_directory_uri() . '/style.css' );
    }
    Thread Starter hallelovers1975

    (@hallelovers1975)

    Hello again,
    thank you very much for your help.

    I corrected the mistakes, but I still got an error for Seasonal Child, which is slightly different now. It says, the superordinate theme is missing and I have to install Seasonal, otherwise I can`t use the child theme.

    I installed the theme Seasonal via WordPress and not manually.

    Thanxs!

    Theme Author Shaped Pixels

    (@shaped-pixels)

    Superordinate? I’ve never seen that before. I just used the same code and files as you did for your child theme on my local test site and everything seems to be fine and fully functional.

    It sounds like you also have the seasonal theme installed, so that should not be a problem.

    So when in doubt and/or things go wacky, I’d say delete the seasonal theme and do a reinstall once again from the WordPress theme installer by starting from scratch.

    Then, make your child theme over with the following info:

    functions.php file:

    <?php
    /**
     * Functions and definitions
     * @package Seasonal Child
     */
    
    // Lets begin by grabbing our stylesheet from the parent theme
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    
    // Load our main stylesheet
    wp_enqueue_style( 'seasonal-child-parent-css', get_template_directory_uri() . '/style.css' );
    }
    ?>

    Then your style.css file:

    /*
    Theme Name: 	Seasonal Child
    Theme URI: 	https://www.shapedpixels.com/free-wordpress-themes/seasonal
    Author: 	shapedpixels.com
    Author URI: 	https://www.shapedpixels.com
    Description: 	This is a blank child theme to use with the Opportune theme whenever you need to make changes to code in the theme.
    Template:     	Seasonal
    License: 	GNU General Public License v3 or later
    License URI: 	https://www.gnu.org/copyleft/gpl.html
    Text Domain: 	seasonal-child
    Tags: 		responsive-layout, custom-colors, post-formats, custom-background, featured-images, microformats, theme-options, translation-ready
    */

    That should work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with installing child theme’ is closed to new replies.