WordPress.org

Ready to get started?Download WordPress

Forums

Completely separate theme for Internet Explorer (9 posts)

  1. tomhanna
    Member
    Posted 9 years ago #

    Is there any way to load a completely separate theme for internet explorer. Not just a different stylesheet, but a whole different theme complete with separate index, footer, header and (especially) sidebar files?

  2. Class
    Member
    Posted 9 years ago #

    Use PHP to check browser, if MSIE { use theme/msie} ...

  3. tomhanna
    Member
    Posted 9 years ago #

    Yeah, detecting the browser isn't the issue. I had to do that to use a separate stylesheet. Once the browser is detected, how do I specify in WordPress (or PHP) that instead of using Theme folder X it use Theme folder Y instead.

    I realize my question was poorly worded. Clearly it is possible. What I actually am wanting to know is how.

  4. Class
    Member
    Posted 9 years ago #

    Hm, I did this a long time ago with a blog I made myself but can't remember how. Maybe a redirect would work?
    php check blabla, <meta http-equiv="refresh" content="1;URL=msiefolder..">.

  5. Class
    Member
    Posted 9 years ago #

    Not sure about this, WP may loop if but maybe you can set a variable, like browserChecked="yes" to prevent a loop?

  6. tomhanna
    Member
    Posted 9 years ago #

    Yeah, I assume I could set it so that if the browser is IE, then "define('WP_USE_THEMES', false);" I'm just not sure where to go from there because short of setting "define('WP_USE_THEMES', true);" I'm not sure how to direct things to the appropriate theme files. If they were in the root directory, it would be easy enough, but I'm afraid I'll thoroughly break things if I put all the theme files out in the root.

  7. Class
    Member
    Posted 9 years ago #

    Maybe you can use <?php bloginfo(); ?> in some creative way here?

  8. tomhanna
    Member
    Posted 9 years ago #

    That might work. I'll work on it and if i come up with a solution, I'll post back.

  9. What about using the theme switcher plugin?

    If the browser is IE, then use <?php header('Location: index.php?theme=IETheme'); ?> or whatever.

    Of course that'll put your site into a loop, so either a custom cookie or reading the theme switcher cookie to check to see if the current theme is "IETheme" is probably the best way to break the loop.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.