Last active
July 27, 2018 00:52
-
-
Save mhige/80659fb001bb4c9766ea4be83611a2cf to your computer and use it in GitHub Desktop.
Barba.jsをWordrepssで読み込む(wp enqueue script)
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 | |
// add_filesの部分は自分で理解しやすい名前をつけてOK | |
function add_files() { | |
// barba.js本体を読み込む | |
wp_enqueue_script( 'barba-js', get_template_directory_uri() . '/js/barba.min.js', array(), '1.0.0', true); | |
// カスタムのjsを読み込む | |
wp_enqueue_script( 'barba-custom', get_template_directory_uri() . '/js/barba-custom.js', 'array(barba-js)', '', true); | |
} | |
add_action('wp_enqueue_scripts', 'add_files'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment