Last active
March 15, 2017 17:08
-
-
Save solid-pixel/7c4e7280039a44a6daa809cfe46ba3da to your computer and use it in GitHub Desktop.
Use a plugin to load JS files
This file contains hidden or 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 | |
/** | |
* Plugin Name: Plugin Name | |
* Plugin URI: http://solidpixel.com | |
* Description: Description | |
* Version: 1.0.0 | |
* Author: Pelly | |
* Author URI: http://solidpixel.com | |
* License: GPL2 | |
*/ | |
function yt_custom_scripts() { | |
wp_enqueue_script( 'custom', plugins_url() . '/plugin-folder/js/custom.js', array(), '1.0.0', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'yt_custom_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment