Here’s a mini-plugin (single line of code actually) that will prevent the new IE8 (aka Internet Explorer 8 ) from messing up your carefully crafted WordPress or bbPress design.
<?php if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {
header("X-UA-Compatible: IE=7");} ?>
Make a mini-plugin out of it and activate.
(you might be able to put it into functions.php if that executes before other data is sent but I am uncertain – for the extremely lazy you could in theory put it as the very very first line of header.php in your template)
I also have it listed as a more formal plugin over here
For those that don’t want to install IE8 permanently to just test their webpages, this version will run in it’s own virtual box so it doesn’t affect the rest of your system:
http://start-o.xenocode.com/layers/ie8/8-0-0-0__2/ie8.exe
There’s no install, it just runs instantly from that one file.
Thank you so much, this fixes the IE8 sIFR troubles on all my sites, cheers! If you’re ever in Sn Francisco the beer is on me.
How to make a mini plugin?
I have try to copy-paste that code to dreamweaver blank php file and save it. Then I upload to my wordpress blog, but the php file is not detected. What should I do?
Thank’s
Anthony you can probably just copy that line into a file called
functions.php
and put it into your wordpress theme folder.
Thank you so much for this tip. I was getting upset. I just installed Explorer 8 and it was rendering my Blog in a weird way. It rendered the text and took a lot of time to display pictures or the header. After putting that code in the functions.php file, it loads as before.
Greetings,
Alex.
Is there a fix for the new FireFox?? I just noticed it render the page in a weird way too in the new 3.0.10 Firefox…
It would be great to know what exactly is causing that problem.. something in the style css, not sure..
it loads the page in a very weird way…
Thanks.
you rock, _ck_ this is great!
your solution worked perfect!! Thank you so much!
I just finished and tested my site for IE6, IE7, Safari, and FF on Mac & PC and worked out whatever little bugs I had with IE7. Then I tested on IE8 and just about flipped when everything rendered all weird…
I hate internet exploder… each version just keeps getting worse **sigh** – the world needs to move to Firefox or any other standards compliant browser!!
My site receives millions of hits each month and I’ve been soooo frustrated with the way it looks in IE8. I had to put this code into my header.php because I already had a function.php file. AND IT WORKED!!!! THANK YOU THANK YOU THANK YOU THANK YOU!!! If you’re ever in Vegas, email me, and I’ll get you a beer as well!!
hi,
I tried everything but my site is not showing up, the video from youtube is floating all over the place its a issue only in IE rest the site is perfect…….please help
moringaleaf.com
thank you my admin.