lisamiltonbayer
3/1/2017 - 10:20 AM

Wordpress - functions.php add style and scripts to header and footer

Wordpress - functions.php add style and scripts to header and footer


// 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' );