Support » Fixing WordPress » IE8 – header(“X-UA-Compatible: IE=7”) — errors??

  • Is it possible that this header code:

    <?php if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {
    header("X-UA-Compatible: IE=7");} ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <?php
    	global $patagonia_nosidebar;
    	$options = get_option('patagonia_options');
    	if (is_home()) {
    		$home_menu = 'current_page_item';
    	} else {
    		$home_menu = 'page_item';
    	}
    	if($options['feed'] && $options['feed_url']) {
    		if (substr(strtoupper($options['feed_url']), 0, 7) == 'HTTP://') {
    			$feed = $options['feed_url'];
    		} else {
    			$feed = 'http://' . $options['feed_url'];
    		}
    	} else {
    		$feed = get_bloginfo('rss2_url');
    	}
    ?>

    is throwing this error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/sitename/public_html/wp-content/themes/patagonia/main.php:8) in /home/sitename/public_html/wp-content/themes/patagonia/header.php on line 2

    For only people using IE8??

    I don’t get this error, tested on mac, Ie6 & 7 on xp and vista..
    only those who are on IE8 get this??

    again, any ehlp would be appreciated.

    thanks

    ~bobbi

Viewing 1 replies (of 1 total)
  • esmi

    (@esmi)

    Forum Moderator

    For only people using IE8??

    Yes – it’s specific to IE8. Try moving:

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

    to just before:

    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘IE8 – header(“X-UA-Compatible: IE=7”) — errors??’ is closed to new replies.