In another WP site where I don't use bootstrap, in the functions.php file, I call the css file this way:
//css
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/mycss.css');
This functions correctly and the necessary pieces are picked up. When I use the latest version of bootstrap 3.3.7, and call it the same way, it fails to pick up the css file:
//css
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');
I have checked on a test HTML file and the only CSS file that it references is the above file in the folder (though I uploaded the other boostrap files in case it points to them from the bootstrap.min.css
file).
So the functions.php approach did not yield the design that I wanted.
Change the header.php css reference to the code he mentions in the second box after Find the links to the CSS files in the header and change them from this (I can't post it here because it generates an error - doesn't show the code and not sure why).
Updated the style.css file with references to all of bootstraps
.css
files, such asbootstrap.css
,bootstrap.min.css
, etc.I updated the header.php and footer.php functions involving
wp_
as discussed.
Nothing; still HTML skeleton. What is wrong here? Thanks!
Code Details:
header.php
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8" />
<meta name="author" content="Script Tutorials" />
<title>Test</title>
<!-- CSS -->
<link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet">
<?php wp_head(); ?>
</head>
<body>
functions.php
<?php
function bootstrap_script_enqueue() {
//css
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');
}
add_action( 'wp_enqueue_scripts', 'bootstrap_script_enqueue');
?>