Any idea how to enqueue bootstrap-sass in wordpress
Closed this issue · 0 comments
Br324 commented
Been changing this code but cant get it to work, I am using the bootstrap -sass version of bootstrap from github and using the twentyseventeen theme with a child theme I also use scout/compass. with the great help of mr easydevtuts. Do you have to use gulp/npm with bootstrap 4 I would prefer to start using bootstrap 4.
`<?php
function my_theme_enqueue_styles() {
$parent_style = 'parent-style'; // 2017 style
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
wp_enqueue_style(
'bootstrap',
get_stylesheet_directory_uri() . '/bootstrap/css/bootstrap.min.css');
wp_enqueue_script(
'bootstrap',
get_stylesheet_directory_uri() . '/bootstrap/js/bootstrap.min.js');
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>`