Child theme CSS not overriding parent theme
-
I’m trying to figure out why my style.css is not overriding the parent style.css.
My child theme folder structure looks like this:themes - simplemag - style.css - css - icons.css - framework.css - [some other folders and files] - simplemag-child - css - icons.css - framework.css - [some other folders and files] - style.css - functions.phpstyle.css from the child theme
/* Theme Name: SimpleMag Theme URI: http://themesindep.com/ Author: ThemesIndep Author URI: http://themesindep.com/ Description: Magazine theme for creative things Template: simplemag Version: 2.0 */ /* Your CSS code goes here */ /* .post .content p { text-align:justify; } */ @media only screen and (min-width: 801px) { .entry-image { opacity:1; } }functions.php from the child theme
<?php /** * SimpleMag child theme functions & definitions * child theme: simplemag-child/style.css * child theme version 2.0 * parent theme: simplemag/style.css * parent theme version 2.2.1 **/ function theme_enqueue_styles() { $parent_style = 'parent-style'; 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 ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); ?>Could any one help to me to see what I am missing?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Child theme CSS not overriding parent theme’ is closed to new replies.