Child theme CSS isn't loading, Unicode breaks
-
When I switch to a child theme of Lovecraft, using the
functions.php
andstyle.css
below, my custom CSS doesn’t appear to do anything. Furthermore, the “gear” icon to the left of Site Meta links is replaced with a misencoded Unicode character.lovecraft-child/functions.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' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style')
);
}lovecraft-child/style.css:
/*
Theme Name: Child of Lovecraft
Description: Child theme of Lovecraft. Lovecraft "is a beautiful two-column theme for bloggers" with "responsive design, great typography, a full-width header image (which is replaced with the post thumbnail on single posts/pages), custom accent color support, custom logo support, editor style support, a Flickr widget, recent posts and recent comments widgets with thumbnails, and a full-width template". I'm just tweaking it.
Author: Spencer Dub (child), Anders Norén (parent)
Author URI: https://spencerdub.me/
Template: lovecraft
Version: 1.0.0
Tags: gray, black, red, white, light, two-columns, right-sidebar, responsive-layout, custom-colors, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready
*/
/* Theme customization starts here:
-----------------------------------------------------------------*/
ul.compact_archive li.compact_archive_year{
list-style-type: none;
}
h2.blog-title{
font-color: red;
/* (just for testing) */
}
If you go to my site, which is currently running this child theme, you can see that the title is not red, and if you look at the Site Meta widget in the sidebar, you can see that the gear icons are not displaying correctly.How do I fix each of these problems? Thanks.
- The topic ‘Child theme CSS isn't loading, Unicode breaks’ is closed to new replies.