Created
June 18, 2017 08:37
-
-
Save salvatorecapolupo/e7df08b6d8fc11e2e247f106e83ba894 to your computer and use it in GitHub Desktop.
Correct way to recreate basic HTML file as targeted on "Get started" Bootstrap official page.
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 | |
add_action('wp_enqueue_scripts', 'headwolf_enqueues' ); | |
function headwolf_enqueues(){ | |
//bootstrap.min.css | |
wp_enqueue_style('bootstrap2017', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7'); | |
//HTML5 shim + Respond.js for IE8 support | |
global $wp_scripts; | |
wp_enqueue_script('modernizr-script', get_template_directory_uri() . '/js/vendor/modernizr.min.js', array(), '3.3.1'); | |
wp_register_script('respond-script', get_template_directory_uri() . '/js/vendor/respond.min.js', array(), '1.4.2'); | |
$wp_scripts->add_data('respond-script', 'conditional', 'lt IE 9'); | |
wp_enqueue_script('respond-script'); | |
wp_register_script('html5-shiv-script', get_template_directory_uri() . '/js/vendor/html5shiv.min.js', array(), '3.7.3'); | |
$wp_scripts->add_data('html5-shiv-script', 'conditional', 'lte IE 9'); | |
wp_enqueue_script('html5-shiv-script'); | |
// bootstrap.js | |
wp_register_script( 'bootstrapscript', get_stylesheet_directory_uri() . '/js/vendor/bootstrap.min.js', array('jquery') ); | |
wp_enqueue_script( 'bootstrapscript' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment