Created
August 3, 2022 14:14
-
-
Save philliproth/d2ccbe7c91e2b0b84077e7749ad278a6 to your computer and use it in GitHub Desktop.
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
/* Example for child theme implementation */ | |
function customname_register_scripts() { | |
$theme_version = wp_get_theme()->get( 'Version' ); | |
wp_enqueue_script( 'customname-js', get_stylesheet_directory_uri() . '/assets/js/custom.js', array(), $theme_version, false ); | |
wp_script_add_data( 'customname-js', 'async', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'customname_register_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment