-
-
Save codearryaas/c171ce2f4a334e99f3b498947b98efd4 to your computer and use it in GitHub Desktop.
Gist for https://github.com/codearryaas/wp-react-theme functions.
This file contains 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
<?php | |
/** | |
* Js & Css assets for child theme. | |
*/ | |
function twentynineteen_child_assets() { | |
wp_enqueue_style( 'twentynineteen-style', get_template_directory_uri() . '/style.css' ); | |
if ( ! is_front_page() ) { | |
return; | |
} | |
wp_enqueue_style( 'twentynineteen-child-style', get_stylesheet_directory_uri() . '/style.css' ); | |
wp_enqueue_script( 'twentynineteen-script-name', get_stylesheet_directory_uri() . '/assets/js/dist/bundle.js', array(), '1.0.0', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'twentynineteen_child_assets' ); | |
// More to come. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment