Advertisement:

Author Topic: link boostrap  (Read 712 times)

grisbi

  • Newbie
  • *
  • Posts: 44
link boostrap
« on: July 28, 2017, 05:26:16 pm »
Hello
How to include bootstrap in file header.php
Can I do like this:

      <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

       <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="bootstrap/js/bootstrap.min.js"></script>

Thank you

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: link boostrap
« Reply #2 on: July 28, 2017, 06:10:45 pm »
you can make use of osclass enqueue function to include stylesheet and javascript files.

to include stylesheets
Code: [Select]
osc_enqueue_style('uniqueNameCSS', 'path/and/file.css');
to include javascript files
Code: [Select]
osc_register_script('uniqueNameJS', 'path/and/file.js?', array('jquery'));
osc_enqueue_script('uniqueNameJS');

the parameter array('jquery') is important to ensure that this file is loaded after jquery is loaded... put this to your theme functions.php or in this file where all other styles and scripts are loaded

grisbi

  • Newbie
  • *
  • Posts: 44
Re: link boostrap
« Reply #3 on: July 29, 2017, 02:17:51 pm »
Ok, so can I do? :

Code: [Select]
Osc_enqueue_style ('bootstrap', 'path/bootstrap.min.css');
thank you

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: link boostrap
« Reply #4 on: July 30, 2017, 07:07:01 am »
yes