Skip to content

Instantly share code, notes, and snippets.

@robertdevore
Last active September 21, 2016 23:00
Show Gist options
  • Save robertdevore/fb8bc80ee8551d854ccf5e66fbb178fd to your computer and use it in GitHub Desktop.
Save robertdevore/fb8bc80ee8551d854ccf5e66fbb178fd to your computer and use it in GitHub Desktop.
Adding Bootstrap files to Underscores theme
<?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