Issue setting up a child theme

Hi,

I have an issue loading a child theme for the Courage Pro theme on my new site https://shop.quickaccesspopup.com/ (running WordPress 5.5.1). I was able to create a child theme for another WP theme (e.g. twentyseventeen) on this site. I was also able to create a child for Courage Pro on another site some time ago (https://www.quickAccesspopup.com).

But when I activate my courage-child theme on https://shop.quickaccesspopup.com, I get a “no css” rendering of the site (as you can see if you check it today).

I’m using these files in the “courage-child” folder (the parent folder is “courage”):

STYLE.CSS

/*
 Theme Name:   Courage Child
 Theme URI:    http://shop.quickaccesspopup.com/wp-content/themes/courage-child/
 Description:  Courage Child Theme
 Author:       Jean Lalonde
 Author URI:   http://shop.quickaccesspopup.com
 Template:     courage
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         courage
 Text Domain:  courage-child
*/

FUNCTION.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' );
}
?>

Looking at the HTML source of my homepage (view-source:https://shop.quickaccesspopup.com/), I can’t find a line such as…

<link rel='stylesheet' id='parent-style-css' href='https://www.quickaccesspopup.com/wp-content/themes/courage/style.css?ver=5.4.2' type='text/css' media='all' />
(taken from my working site)

… that is normally found in pages of a site with a child theme. It looks like the function theme_enqueue_styles() did not do its job? Any idea what could be wrong?

Thanks,

Jean

  • This topic was modified 1 day, 8 hours ago by jlalonde.

The page I need help with: [log in to see the link]



Source link