Skip to content

Instantly share code, notes, and snippets.

@Edwardtonnn
Created March 10, 2021 18:19
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 Edwardtonnn/f68f0847a8c138854c6f77a296217dff to your computer and use it in GitHub Desktop.
Save Edwardtonnn/f68f0847a8c138854c6f77a296217dff to your computer and use it in GitHub Desktop.
Adding Actions
/**
* Enqueue Glide.js scripts and styles.
*/
function glide_js_scripts_styles() {
wp_enqueue_style( 'glide-core', get_theme_file_uri( '/glide/glide.min.css' ), array(), filemtime( get_theme_file_path( '/glide/glide.min.css' ) ) );
wp_enqueue_style( 'glide-theme', get_theme_file_uri( '/glide/glide.theme.css' ), array(), filemtime( get_theme_file_path( '/glide/glide.theme.css' ) ) );
wp_enqueue_script( 'glide', get_theme_file_uri( '/glide/glide.min.js' ), array(), filemtime( get_theme_file_path( '/glide/glide.min.js' ) ), true );
wp_enqueue_script( 'my-glide', get_theme_file_uri( '/glide/my.glide.js' ), array('jquery'), filemtime( get_theme_file_path( '/glide/my.glide.js' ) ), true );
}
add_action( 'wp_enqueue_scripts', 'glide_js_scripts_styles', 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment