Fresh TwentySeventeen completely ignores child theme css
-
I have an issue with Twenty Seventeen child theme.
I have created both style.css and functions.php files. I have successfully loaded the -child theme and my website is currently running it. However, whatever changes I make in the child style.css, they are completely ignored.
I want my child style.css to overwrite any default twentyseventeen style.css rules.
The problem is, no matter what I write in my child style.css file, it is completely ignored and all the styles are loaded from parent style.cssAny help would be appreciated.
style.css code:
/* Theme Name: Twenty Seventeen Child Theme URI: http://www.example.com Description: Twenty Seventeen Child theme Author: Author Author URI: http://www.example.com Template: twentyseventeen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: twenty-seventeen-child */
functions.php code
<?php function my_theme_enqueue_styles() { $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme. 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', 'my_theme_enqueue_styles' ); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Fresh TwentySeventeen completely ignores child theme css’ is closed to new replies.