Khandaker Toihidul Islam
Front-end Developer
React Js | Javascript | HTML | CSS | Bootstrap | Wordpress | PHP | Mysql

Bootstrap in wordpress

We can easily bootstrap to wordpress by editing unique script function in funtion.php of a theme

function divichild_enqueue_scripts() {
	wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
	
	//Bootstrap
	wp_enqueue_style( 'bootstrap', 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css', array(), 20141119 );
    wp_enqueue_script( 'bootstrap','https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js', array('jquery'), '20120206', true );
 
}
add_action( 'wp_enqueue_scripts', 'divichild_enqueue_scripts' );

You may also like...

Leave a Reply