Skip to content

Instantly share code, notes, and snippets.



Last active Oct 19, 2017
What would you like to do?
Force IE not to use so-called "compatibility" mode in the Genesis theme framework.
// Do not copy opening php tag
// Force Stupid IE to NOT use compatibility mode
add_filter( 'wp_headers', 'wsm_keep_ie_modern' );
function wsm_keep_ie_modern( $headers ) {
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) {
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1';
return $headers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment