Reputation: 45
Im having a problem in wordpress when i want to use classes in bootstrap like span, col-md, col-lg and also glyphicons. its not working
Here is my code:
Header
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- Le styles -->
<link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet">
<title><?php bloginfo('name'); ?></title>
<?php wp_enqueue_script("jquery"); ?>
<?php wp_head(); ?>
<!-- Preventing from clicking back button in all browser -->
<script type="text/javascript">
window.history.forward();
function noBack() {
window.history.forward();
}
</script>
</head>
Style(css)
/*
Theme Name: CRM bootstrap
Author: Mark
Version: 1.0
*/
@import url('bootstrap/css/bootstrap.css');
@import url('bootstrap/css/bootstrap.min.css');
@import url('bootstrap/css/bootstrap-responsive.css');
@import url('bootstrap/css/bootstrap-responsive.min.css');
body {
margin-top: 60px;
}
Upvotes: 1
Views: 1105
Reputation: 2739
You need too add them to your functions.php
file. Here is a demo of what that looks like,
function bluebreeze_script_enqueue(){
//CSS
wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.min.css', array(), '3.4.4', 'all');
wp_enqueue_style('fontawesome', get_template_directory_uri().'/css/font-awesome/css/font-awesome.css', array(), '4.4.0', 'all');
wp_enqueue_style('customstyle', get_template_directory_uri().'/css/bluebreeze.css', array(), '1.0.0', 'all');
//JS
wp_enqueue_script('customjquery', get_template_directory_uri().'/js/jquery.min.js', array(), '2.1.4', true);
wp_enqueue_script('bootstrap', get_template_directory_uri().'/js/bootstrap.min.js', array(), '3.4.4', true);
wp_enqueue_script('customjs', get_template_directory_uri().'/js/bluebreeze.js', array(), '1.0.0', true);
//Angular Apps
if (is_page( array('mortgage-calculator', 'contact' ) )){
wp_enqueue_script('angularjs', get_template_directory_uri().'/js/angular.min.js', array(), '1.4.1', true);
wp_enqueue_script('d3', get_template_directory_uri().'/js/d3.min.js', array(), '10/22/2015', true);
wp_enqueue_script('c3-js', get_template_directory_uri().'/js/c3.min.js', array(), '10/22/2015', true);
wp_enqueue_script('c3-css', get_template_directory_uri().'/css/c3.min.css', array(), '10/22/2015', false);
wp_enqueue_script('fcsaNumber', get_template_directory_uri().'/js/fcsaNumber.min.js', array(), '1.0.0', true);
wp_enqueue_script('mortCalcApp', get_template_directory_uri().'/js/mortCalcApp.js', array(), '1.0.0', true);
}
}
add_action( 'wp_enqueue_scripts', 'bluebreeze_script_enqueue');
Upvotes: 1