scrawl child theme
-
functions.php
=============<?php
/**
* @package Scrawl Child Theme
*//**
* Load the parent and child theme styles
*/
function scrawl_parent_theme_style() {// Parent theme styles
wp_enqueue_style( 'scrawl-style', get_template_directory_uri(). '/style.css' );// Child theme styles
wp_enqueue_style( 'scrawl-child-style', get_stylesheet_directory_uri(). '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'scrawl_parent_theme_style' );/**
* Add additional functions below
*/style.css
=========/*
Theme Name: Scrawl Child
Version: 1.0
Text Domain: scrawl-child
Template: scrawl
*//* Add your CSS customizations below this line */
I cannot get a child theme of scrawl to work correctly. I create a child theme with 2 files, functions.php and style.css. The contents of those files is listed above.
Whenever I activate the scrawl child theme, the info put into the url for the parent style sheet is always set to ‘scrawl-child/style.css’ rather than ‘scrawl/style.css’. I use the same code in a child theme for the ‘atomic-blocks’ theme, it is just not setting the path correctly in the generated code. This is the code generated:
<link rel='stylesheet' id='scrawl-style-css' href='https://localhost/wordpress/wp-content/themes/scrawl-child/style.css?ver=5.4.1' type='text/css' media='all' />
Where does that ‘-child’ come from??
Al
I am on a local test system, wordpress 5.4, gutenberg 8.2.1
- The topic ‘scrawl child theme’ is closed to new replies.