Child Theme style.css takes no effect
-
Hi
I have created a child theme for TT4 and WP 6.6. Styles seems to take no effect. Here is the sheet as is now:
/*
Theme Name: Draupnir 9
Theme URI:
Author: Me
Author URI: https://me.com
Description: Draupnir 9 is a child theme of Twenty Twenty-Four and is designed to be flexible, versatile and applicable to any website for present and future WP themes. The collection of templates and patterns include original default from WP as well as custom tailored to different needs, such as presenting a business, blogging, multi vendor representation and writing or showcasing work. A multitude of possibilities open up with just a few adjustments to color and typography. Draupnir 9 comes with custom style variations and full page designs in addition to default WP, is fully compatible with the site editor, and takes advantage of new design tools introduced by WordPress.
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 8.0
Version: 1.0
License:
License URI: https://me.com
Template: twentytwentyfour
Text Domain: draupnir-9
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news, multi-vendor, woocommerse, ecommerce
*/
.i-have-a-red-background {
color: white !important;
background: red !important;
}I have tried adding the class (no dot) in settings > additional css for various blocks to no effect. W/WO !important makes no difference.
I understand TT4 does not call a style.css, so I have placed this in child functions.php. Am I completely in the woods here? As I understand, this is the snippet if child theme is the theme and I call style.css wihtin the child.
add_action( 'wp_enqueue_scripts', 'draupnir_9_enqueue_styles' );
function draupnir_9_enqueue_styles() {
wp_enqueue_style(
'draupnir-9-style',
get_stylesheet_uri()
);
}Thx
- You must be logged in to reply to this topic.