• As Bootstrap is likely to be updated at different intervals than the THBusiness theme, here is some code to get the Bootstrap CSS and JS from a CDN.

    <?php
    
    add_action('wp_enqueue_scripts', 'thb_latest_bootstrap_files', 20 );
    function thb_latest_bootstrap_files() {
      //wp_enqueue_style('bootstrap.css', get_template_directory_uri() . '/css/bootstrap.css', array(), 'all');
      wp_deregister_style('bootstrap.css');
      wp_enqueue_style('bootstrap.css', '//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css', array(), 'all');
    
      //wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js',array( 'jquery' ),'', true);
      wp_deregister_script('bootstrap-js');
      wp_enqueue_script('bootstrap-js', '//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js', array( 'jquery' ), '', true);
    }

    This code can be put in a function plugin
    I got the urls from: https://getbootstrap.com/getting-started/#download

  • The topic ‘How to update to bootstrap 3.2.0’ is closed to new replies.