Nyi Nyi Naing Nyi Nyi Naing - 3 months ago 9x
CSS Question

How to add bootstrap css to my Wordpress plugin

I am developing a Wordpress plugin.

I would like to know how to integrate a Bootstrap CSS file into my plugin?


create a function in your Plugin file

function add_scripts_and_css(){
  wp_enqueue_style('your-plugin-bootrtrap_css',  plugin_dir_url( __FILE__ ) . 'folderpath/bootstrap.css');

add_action('wp_enqueue_scripts', 'add_scripts_and_css');

This is the way to add wp_enqueue_style to add css files and wp_enqueue_script to add JavaScript .js files.