Loading Bootstrap with wp_enqueue_style and wp_enqueue_script

Question

I’m looking to load Bootstrap on a theme I’m working on though can’t figure out how to add the JS file that comes with Bootstrap. I already created a function that loads some of my custom styles and it works great, afterwards I downloaded Bootstrap, moved the file into my theme directory and added

wp_enqueue_style('bootstrap', get_template_directory_uri() .       'css/bootstrap.min.css');

I haven’t tried that so I don’t know if it works or not, now I just have to add the bootstrap.min.js file but can’t figure out how, so your help would be appreciated.

This is my code so far

<?php 

function xobamax_resources() {

    wp_enqueue_style('bootstrap', get_template_directory_uri() . 'css/bootstrap.min.css');
    wp_enqueue_style('style', get_stylesheet_uri());


}

add_action('wp_enqueue_scripts', 'xobamax_resources');
0
, OulaX 1 year 2020-07-17T03:10:24-05:00 0 Answers 63 views 0

Leave an answer

Browse
Browse