Skip to content

Instantly share code, notes, and snippets.

@pramod1988
Last active March 29, 2017 10:45
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 pramod1988/943c081956ab640539d3e5b2296df68e to your computer and use it in GitHub Desktop.
Save pramod1988/943c081956ab640539d3e5b2296df68e to your computer and use it in GitHub Desktop.
Wordpress Child theme add css and js
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
// Get the theme data
$the_theme = wp_get_theme();
wp_enqueue_style( 'child-understrap-styles', get_stylesheet_directory_uri() . '/css/child-theme.min.css', array(), $the_theme->get( 'Version' ) );
wp_enqueue_script( 'child-understrap-scripts', get_stylesheet_directory_uri() . '/js/child-theme.min.js', array(), $the_theme->get( 'Version' ), true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment