Embed bootstrap in wordpress themes

mjtappy

New member
Good day!

Currently Im developing a wordpress themes using Bootstrap3.0.0 classes.. My situation is before i use bootstrap 3.0.0 where their is no less files .
I tried to update my bootstrap with version 3.2.0 but i dont know how to embed it in wordpress...any help guyz about embedding all files of bootstrap 3.2.0 in my WP themes?
If you ask me why i want to upgrade from that version well Bootstrap 3.0.0 cant execute the modal in onload event , unlike in 3.2.0 which have an event to load the modal in page load...
 

GigaGreg

Moderator
Staff member
Hey, it is very easy to embed your tbf to wordpress.

All what you have to do is to copy all of the files to your wordpress directory: css folder and js folder.
Then in your wordpress index.php you need to add:
1. <link href="(templatepath)css/bootstrap.css" rel="stylesheet">
or
1a. <link href="(templatepath)css/bootstrap.min.css" rel="stylesheet">

At the end of body, just before closing tag:
2. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

2a. <script src="js/bootstrap.min.js"></script>

And that should be it.
 

mjtappy

New member
iGdesigner said:
Hey, it is very easy to embed your tbf to wordpress.

All what you have to do is to copy all of the files to your wordpress directory: css folder and js folder.
Then in your wordpress index.php you need to add:
1. <link href="(templatepath)css/bootstrap.css" rel="stylesheet">
or
1a. <link href="(templatepath)css/bootstrap.min.css" rel="stylesheet">

At the end of body, just before closing tag:
2. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

2a. <script src="js/bootstrap.min.js"></script>

And that should be it.

Ahh Ok... But what is the different from other packages of bootstrap that have less and something like Sass?

In addition, if you use bootstrap in Wordpress themes I still have a trouble about in WYSIWYG editor of Wordpress . . How to add the classes of bootstrap in the editor.. You see , the reason why Wordpress is cool is it allows you to manage the content of the site in simple manner that you just select tools in the editor.. Now is there a way that the styles of editor is compatible in bootstrap?
 

GigaGreg

Moderator
Staff member

mjtappy

New member
iGdesigner said:
Ohh right, that is what you mean, you need to make custom short codes for Bootstrap or install special plugin.

Just googled and my results are:
https://github.com/filipstefansson/bootstrap-3-shortcodes
https://wordpress.org/plugins/easy-bootstrap-shortcodes/
https://wordpress.org/plugins/bootstrap-shortcodes/

Chose which one suits you better.

You said something about less and sass. You need to include it within your normal css file i think, i might be wrong, but not sure 100%

Should i treat less and sass as the same as css? How to call the less and sass in header tag or should i call that like css calling?
 

GigaGreg

Moderator
Staff member
Yes you should treat less and sass the same, because sass is just a library for css, I'm sure that less and sass is already build with bootstrap unless you have chosen to not put them into bootstrap folder while downloading.Customize your bootstrap and add less and sass into it. http://getbootstrap.com/customize/