Last active
September 21, 2016 23:00
-
-
Save robertdevore/fb8bc80ee8551d854ccf5e66fbb178fd to your computer and use it in GitHub Desktop.
Adding Bootstrap files to Underscores theme
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 | |
/** | |
* Enqueue scripts and styles. | |
*/ | |
function bliss_theme_scripts() { | |
wp_enqueue_style( 'bliss-theme-style', get_stylesheet_uri() ); | |
wp_enqueue_style( 'bliss-theme-bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' ); | |
wp_enqueue_script( 'bliss-theme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20160921', true ); | |
wp_enqueue_script( 'bliss-theme-bootstrap-javascript', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20160921', true ); | |
wp_enqueue_script( 'bliss-theme-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160921', true ); | |
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { | |
wp_enqueue_script( 'comment-reply' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'bliss_theme_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment