Home / Archive / Bootstrap 5
Duplicate Snippet

Embed Snippet on Your Site

Bootstrap 5

Code Preview
php
<?php
// Add custom scripts
function add_custom_script_bootstrap5() {
			
			wp_register_script( 'bootstrap5_js', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js', array(), '5.3.3', true );
			wp_enqueue_script( 'bootstrap5_js' );
			
			
			wp_register_style( 'bootstrap5_css', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css', array(), '5.3.3', true );
			wp_enqueue_style( 'bootstrap5_css' );
			
			
			wp_register_style( 'bootstrap5_css_containers', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/scss/_containers.scss', array(), '5.3.3', true );
			wp_enqueue_style( 'bootstrap5_css_containers' );
			
}
add_action( 'wp_enqueue_scripts', 'add_custom_script_bootstrap5' );

Comments

Add a Comment