Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Thread Starter
Mike
(@urbanhillbilly)
In header.php, I defined the following doctype:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
Even tried changing it around to define a different doctype, no help.
Here’s the entire header.php file:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset') ?>" />
<title><?php wp_title('|', true, 'right'); bloginfo('name'); ?></title>
<meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width">
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php
remove_action('wp_head', 'wp_generator');
if (is_singular() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<div id="main">
<?php if(theme_has_layout_part("header")) : ?>
<header class="clearfix header<?php echo (theme_get_option('theme_header_clickable') ? ' clickable' : ''); ?>"><?php get_sidebar('header'); ?></header>
<?php endif; ?>
<nav class="nav clearfix">
<?php
echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'hmenu'
)
);
get_sidebar('nav');
?>
</nav>
<div class="sheet clearfix">
<div class="layout-wrapper clearfix">
<div class="content-layout">
<div class="content-layout-row">
<div class="layout-cell content clearfix">
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What’s this doing;
<script type="text/javascript" src="js/redirection_mobile.min.js"></script>
<script type="text/javascript">
SA.redirection_mobile ({tablet_redirection : "true",mobile_prefix : "http",mobile_url : "islanddentalassociates.com/mobile"});
</script>
Right at the top of your document?
Don’t put anything above the doctype.
If you don’t recognise it, try deactivating plugins to explore whether any could be responsible. View your webpage’s source to check if it goes away.
Thread Starter
Mike
(@urbanhillbilly)
That was a redirection script for a potential mobile site, I think it was the JS Redirection plugin – that plugin has been long removed, can’t believe it’s still in there. Been going through each php file, can’t find the call for the javascript anywhere.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Thread Starter
Mike
(@urbanhillbilly)
I don’t think so, used a fresh file that hasn’t been altered and still showing up.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Hang on there Mike, you have resolved the issue, right? IE should now recognise the doctype because you managed to remove the script from the top of the page. May I ask, how did you resolve the issue?
Thread Starter
Mike
(@urbanhillbilly)
I literally just finished the fix. Believe it or not, the code was in the basically useless index.php file (not the ones included in a core WordPress installation) that replaces the place holding index.htm(l) file on a brand new hosting site. Removed that nasty code and all was well!
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Excellent! How’s IE looking?
Thread Starter
Mike
(@urbanhillbilly)
IE9 and up looks great, everything is lined up like it’s supposed to. IE7 and 8 looks like it should without the HTML5 elements, and under that looks like junk as expected.