javascript - Wordpress Site loads CSS and JS but does not work
one text
I am trying to add My css and bootstrap css to my Wordpress website, including the js and it loads on the website but does not apply the css and js. The "wp_head()" and "wp_footer" are included in the header.php and the footer.php. I am using Local Flywheel as setup and used local bootstrap files because i prefer that.
function rb_enqueue() {
$ver = RB_DEV_MODE ? time() : false;
wp_enqueue_style('rb_style', get_theme_file_uri() . '/css/stylesheet.css', [], $ver, true);
wp_enqueue_style('btscss', get_theme_file_uri() . '/css/bootstrap.min.css', [], $ver, true);
wp_enqueue_style('fontawesome', 'https://use.fontawesome.com/releases/v5.15.3/css/all.css', [], '5.15.3', true);
wp_enqueue_script('jquery', get_theme_file_uri(). '/js/jquery.min.js', array('jquery'), $ver, true);
wp_enqueue_script('btsjs', get_theme_file_uri(). '/js/bootstrap.bundle.min.js', array('jquery'), '5.0.2', true);
wp_enqueue_script('btsesm', get_theme_file_uri(). '/js/bootstrap.min.js', array('jquery'), '5.0.2', true);
wp_enqueue_script('rb_script', get_theme_file_uri(). '/js/script.js', array('jquery'), $ver, true);
}
in functions.php
include( get_theme_file_path('/inc/enqueue.php'));
add_action( 'wp_enqueue_scripts', 'rb_enqueue' );
in index.php
<?php get_header();?>
<p>hello i am here</p>
<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-secondary">Secondary</button>
<button type="button" class="btn btn-outline-success">Success</button>
<button type="button" class="btn btn-outline-danger">Danger</button>
<button type="button" class="btn btn-outline-warning">Warning</button>
<button type="button" class="btn btn-outline-info">Info</button>
<button type="button" class="btn btn-outline-light">Light</button>
<button type="button" class="btn btn-outline-dark">Dark</button>
<?php get_footer();?>
Can somebody please help me image of website at this moment
Image of loading files in website
Source