Skip to content

Instantly share code, notes, and snippets.

@brentini
Forked from taninbkk/functions.php
Last active March 23, 2018 21:43
Show Gist options
  • Save brentini/7a13320a787d78e91114f9a2225aabe5 to your computer and use it in GitHub Desktop.
Save brentini/7a13320a787d78e91114f9a2225aabe5 to your computer and use it in GitHub Desktop.
Wordpress Child Theme Overriding Parent #wordpress
// 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' );
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')
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment