Skip to content

Instantly share code, notes, and snippets.

@norcross
Created January 8, 2014 18:06
Show Gist options
  • Save norcross/8321396 to your computer and use it in GitHub Desktop.
Save norcross/8321396 to your computer and use it in GitHub Desktop.
load Bootstrap CDN items
<?php
add_action ( 'wp_enqueue_scripts', 'bootstrap_cdn_scripts_styles', 10 );
function bootstrap_cdn_scripts_styles() {
wp_enqueue_style( 'bootstrap-css', '//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css', array(), '3.0.3', 'all' );
wp_enqueue_script( 'bootstrap-js', '//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js', array(), '3.0.3', true );
}
@jasonhobbsllc
Copy link

Thanks so much! I am guessing this will work fine if I remove the style line? I already added the CSS I wanted to my child theme's style.css file. I put it before the Genesis standard CSS reset. Hoping putting it there will help me prevent css conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment