August 25, 2021 at 4:35 am
Hi there !
First of all I have to mentionne that I’m a pure beginner. I know many people got confronted to the same issue on other forums and websites, but none of the answers were able to help me. Or maybe I just wasn’t competent enough to understand and apply them correctly.
So here’s my issue:
I’ve been trying to install a child theme in order to fullfill some small changes on my website. I’ve managed to install it and activate it without any problem. Thing is whenever I try to change something in the style.css the changes doesn’t apply like if the stylesheet were getting overwritten or the path incorrect.
First thing I try to do was to add this to my function.php :
function child_enqueue_styles() {
wp_enqueue_style( 'child-theme', get_stylesheet_directory_uri() . '/style.css', array(), 100);
add_action( 'wp_enqueue_scripts', 'child_enqueue_styles', );
Didn’t work.
Then I added a number at the end
add_action( 'wp_enqueue_scripts', 'child_enqueue_styles', 15);
It worked but only for once. I wasn’t able to apply any other changes afterwards.
I’m a bit lost do you have any idea on how can I get it to work ?
Thanks,
RG