Skip to content

Instantly share code, notes, and snippets.

@radarin
Created November 24, 2017 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radarin/6716180c25607b7dadd083fccfc17a82 to your computer and use it in GitHub Desktop.
Save radarin/6716180c25607b7dadd083fccfc17a82 to your computer and use it in GitHub Desktop.
WP-Child-Theme: CSS in function.php
<?php
function twentyseventeen_child_styles() {
wp_deregister_style( 'twentyseventeen-style');
wp_register_style('twentyseventeen-style', get_template_directory_uri(). '/style.css');
wp_enqueue_style('twentyseventeen-style', get_template_directory_uri(). '/style.css');
wp_enqueue_style( 'childtheme-style', get_stylesheet_directory_uri().'/style.css',
array('twentyseventeen-style') );
}
add_action( 'wp_enqueue_scripts', 'twentyseventeen_child_styles' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment