Last active
April 13, 2020 06:50
-
-
Save taninbkk/a47a9ec50205e9d95b015a69a560f687 to your computer and use it in GitHub Desktop.
Wordpress Child Theme Overriding Parent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit @rmulugeta https://wordpress.org/support/users/rmulugeta/ | |
// from https://wordpress.org/support/topic/child-theme-not-overriding-parent-stylecss/ | |
<?php | |
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles',999 ); | |
function theme_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'child-style', | |
get_stylesheet_directory_uri() . '/styles/child-style.css', | |
array('parent-style') | |
); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment