ie8 bootstrap wordpress glyphicon

Posted: September 4, 2014 in web

you need to download bootstrap locally for this to work. ie8 will not work using CDN.

http://getbootstrap.com/customize/

you will have a zip file container all files needed.

On my case I load it all on my custom plugin and I copied the whole bootstrap directory including the fonts to my plugin directory.

my main plugin class. i’ve got a helper method load_file the uses wp_enqueue_style

....
            $this->load_file(self::slug . '-script1', '/js/bootstrap.min.js', true);
            $this->load_file(self::slug . '-style4', '/css/main.css');
            $this->load_file(self::slug . '-style5', '/css/bootstrap.min.css');
            $this->load_file(self::slug . '-style6', '/css/bootstrap-theme.min.css');
....

header.php – it should be after wp_head

        <?php wp_head(); ?>
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]--> 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s