So I'm trying to create a child theme called premierpas from the wordpress theme "fullscreen-agency". I create the premierpas folder in the themes, then I added a css file with that content :
/*
Theme Name: Premier Pas
Author: Garga Le Noir
Template: fullscreen-agency
Version: 1.0.0
*/
and a functions.php with this content :
<?php
function premierpas_enqueue_styles() {
$parent_style = 'fullscreen-agency';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),null);
}
I've tried quite a few other versions of the functions code, without success. When I try to activate it, my website just breaks. I only have a message telling me there is a technical problem, and I get an email to activate the recovery mode. I'm sure the error is trivial and I'm sorry if I'm wasting your time, but I'm quite stuck on this... Any help will be appreciated, thanks in advance
I created a child theme with the code you stated above and it worked for me. The one change I made was I set the parent to be twentyfifteen
since I didn't have your fullscreen-agency
parent theme. I assumed your file paths were...
wp-content/themes/premierpas/style.css
wp-content/themes/premierpas/functions.php
A couple things to try...
premierpas_enqueue_styles()
defined in your parent theme or there is some related error.define( 'WP_DEBUG', true );
then try reactivating the child theme and look at your wp-content/debug.log file to see if there are any relevant errors thrown that can help you troubleshoot further.