• Resolved myhero

    (@myhero)


    Hi all,
    I’m busy creating a child theme and have put the info below in my style and functions files. I zip them and upload via wp theme upload, the upload fails each time. What am I doing wrong?

    Note I want the child theme name to be ‘aaa’ only. The parent theme I am using is ColorMag.

    Child theme
    ———–

    STYLE.CSS

    /*
     Theme Name:   aaa
     Theme URI:    https://www.aaa.com
     Description:  aaa
     Author:       aaa
     Author URI:   https://aaa.com
     Template:     ColorMag
     Version:      1.0.0
     License:      GNU General Public License v2 or later
     Text Domain:  lmfpo
    */

    And this in my FUNCTIONS.PHP

    <?php
    
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
Viewing 6 replies - 1 through 6 (of 6 total)
  • Do you remember the error message you received? One thing I can see is in your stylesheet’s header, the Template: line needs to contain the name of the folder that contains your parent theme, and capitalization matters. It should (probably) be:

    Template: colormag

    Thread Starter myhero

    (@myhero)

    Thanks for you response, I’ve double checked and see that the template name is correct: colormag

    This is the error I get:

    Unpacking the package…
    
    Installing the theme…
    
    The package could not be installed. The theme is missing the style.css stylesheet.
    
    Theme install failed.

    This is strange because the style.css is present in the zip file.

    Thread Starter myhero

    (@myhero)

    Oh no, found the problem, the style.css file I created was in seen as a txt file.

    I’ve saved it in .css format and this has solved the problem.

    Thanks for your help.

    Hi I am a newbie to wordpress, designing a website using colormag. I just want to edit a part of this theme related to header. I couldn’t figure out where can i actually edit the code to use the header image as header background so the my logo appears over it.

    I would be grateful if someone could give me a walkthrough.

    ElizabethFlynn

    (@elizabethflynn)

    Hello I would like to do the exact same thing ie use the header image as header background. Did you get advise on this? Please let me know. Thank you

    Hi I did try the code by @myhero, but still getting the error.

    @myhero, can you share the zip file for the same.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Child Theme creation help’ is closed to new replies.