How to include Bootstrap files in a theme?

2

I'm trying to include Bootstrap's responsiveness in Wordpress, I tried via CDN and among some other methods but it works sort of partial. For example: If I apply classes type container , row , a button with class alert works, but when I try to make a navbar "collapsavel" the menu gets all deformed and without styling (even getting code ready on the Bootstrap site).

I created the header, index, sidebar, footer, functions, style files and did not walk anything yet because I can not make this thing work right.

file folder as I'm doing with print how the menu is. he does not get the style or the responsiveness

link

    
asked by anonymous 04.07.2015 / 04:34

1 answer

1

You also need to add the JavaScript file because these components depend on JavaScript code. Place after your tag that includes JQuery .

Example to put in <head>

<script src='/wp-includes/js/jquery/jquery.js?ver=1.11.2'></script>
. . .
<link rel='stylesheet' href='/wp-content/themes/xpto/css/bootstrap.min.css?ver=3.3.4' type='text/css' media='all'/>
<script type='text/javascript' src='/wp-content/themes/xpto/js/bootstrap.min.js?ver=3.3.4'></script>

Here I am assuming your theme is called xpto

Of course you can use CDN.

    
04.07.2015 / 18:16