Last active
June 8, 2017 14:13
-
-
Save ScarletPonytail/a023cbbcbd69e18c32419f7d01f9e36e to your computer and use it in GitHub Desktop.
Wordpress - functions.php add style and scripts to header and footer
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
// Add style.css to header | |
// ---------------------------------- | |
function vinx_style() { | |
wp_enqueue_style( 'Vin-X Style', get_stylesheet_uri() ); | |
} | |
add_action( 'wp_enqueue_scripts', 'vinx_style' ); | |
// Add Script to header | |
// ---------------------------------- | |
function vinx_bootstrap_scripts() { | |
wp_enqueue_script( 'Vin-X Bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array( 'jquery' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'vinx_bootstrap_scripts' ); | |
// Add Script to footer | |
// ---------------------------------- | |
function vinx_bootstrap_scripts() { | |
wp_enqueue_script( 'Vin-X Bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array( 'jquery' ) ); | |
} | |
add_action( 'wp_footer', 'vinx_bootstrap_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment