CSS Broken
-
A site I have not touched for a few days is now completely broken as far as the CSS is concerned. The error generated on the server is this:
Did not parse stylesheet at ‘http://www.mysite.com/wp-content/themes/twentyfourteenchild/style.css?b-modified=1481820305&ver=751d4e15546b157d8a65edb7e1afe76f’ because non CSS MIME types are not allowed in strict mode.
I don’t have any idea as to what might be going on here. I reloaded a backup of the stylesheet in question – no joy.
I have tried to enqueue both the parent and child’s CSS in the child theme’s functions.php file, with this code:
function twentyfourteen_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’, array( ‘genericons’ ) );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array( ‘parent-style’ )
);
}
add_action( ‘wp_enqueue_scripts’, ‘twentyfourteen_enqueue_styles’ );If I examine the site’s CSS now from the top page, the CSS file, twentyfourteenchild/style.css shows up in the code examination tool as completely different – it has the whole page’s code from the DocType declaration down! The only way I can get the child theme’s CSS to work is to paste it into the Theme Customize panel under CSS.
The topic ‘CSS Broken’ is closed to new replies.