WordPress not rendering correctly in IE8

Discussion in 'HTML & Website Design' started by davidlt, Jun 4, 2009.

  1. #1
    Here is my site: minneapolis carpet installation
    It seems to work fine in all the browsers except IE8. Only the index page is giving me a problem. Does anybody have a fix for this?

    My carpet installer is starting to get impatient with me. :p
     
    davidlt, Jun 4, 2009 IP
  2. Argentum

    Argentum Guest

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    One solution would be to add this line at the beginning of your functions.php

    <?php if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {
    header("X-UA-Compatible: IE=7");} ?>
     
    Argentum, Jun 4, 2009 IP
  3. davidlt

    davidlt Active Member

    Messages:
    219
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Thanks Argentum,
    I am not a designer. Here is how the file starts out:
    <?php
    /**
    * Main WordPress API
    *

    There is a lot more code and it ends with "?>"
    so where would I insert it?
    Thanks in advance for your help.
    Dave
     
    davidlt, Jun 4, 2009 IP
  4. Argentum

    Argentum Guest

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey David.. You must paste this piece of code at the beginning, just before all the code you already have. Save and upload. Let me know if it worked.


    <?php if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {
    header("X-UA-Compatible: IE=7");} ?>


    <?php
    /**
    * Main WordPress API
    *
    ?>
     
    Argentum, Jun 4, 2009 IP
  5. davidlt

    davidlt Active Member

    Messages:
    219
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #5
    No that didn't work. It displays an error message now though.
     
    davidlt, Jun 4, 2009 IP
  6. Argentum

    Argentum Guest

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok, can you try pasting the code in header.php instead of functions.php.

    This fix really depends on the theme u are using and the plugins you have active. do you have the latest wordpress version installed?

    if nothing of that works.. you can then try this other fix:

    (Edit: for some reason I can't post links)
     
    Argentum, Jun 4, 2009 IP
  7. davidlt

    davidlt Active Member

    Messages:
    219
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #7
    that didn't work either.
    Is this the file I should be editing: /home/minncarp/public_html/wp-content/themes/carpetinstall/header.php
    It was the only place I found header.php. I was editing functions.php in the includes folder.
    Thanks again for trying.
     
    davidlt, Jun 4, 2009 IP
  8. Argentum

    Argentum Guest

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You need to edit the functions.php of your theme, not the functions of wordpress.

    Let's see if it works.
     
    Argentum, Jun 5, 2009 IP
  9. optimeramera

    optimeramera Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You can also try the meta..Paste this in your header.php;

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
     
    optimeramera, Jun 5, 2009 IP
  10. davidlt

    davidlt Active Member

    Messages:
    219
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #10
    Argentum - I should have mentioned that I tried it in both functions.php files and it didn't work.
    Optimeramera - I tried adding the meta tag and that didn't work either.

    Thanks to both of you. Any other suggestions?....
    Dave
     
    davidlt, Jun 5, 2009 IP