Created
March 21, 2018 17:00
-
-
Save jerrickhakim/936158c9c8ecd7ecca0d35de9036bd32 to your computer and use it in GitHub Desktop.
Enqueue Script & Styles Into WordPress Theme
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
// LOAD CUSTOM JS | |
function load_custom_js() { | |
wp_enqueue_script( 'custom', get_stylesheet_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.0.0', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'load_custom_js' ); | |
// LOAD CUSTOM STYLES | |
add_action( 'wp_enqueue_scripts', 'enqueue_load_fa' ); | |
function enqueue_load_fa() { | |
wp_enqueue_style( 'load-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '4.7.0', false ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment