我添加了建议的所有引导链接和脚本,清除了缓存,并将我的服务器添加到IE安全性。引导元素仍未显示。我错过了什么?有人怎么过这个?
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7" content="IE=8" content="IE=9" content="IE=10" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> JLB Artistry </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<script src="https://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
抱歉,Bootstrap代码在代码块中无法正常工作,所以我不包含它。
答案 0 :(得分:1)
我不是百分百肯定,但我相信你需要将它添加到你排队引导程序脚本的functions.php中
/**
* Add Respond.js for IE
*/
if( !function_exists('ie_scripts')) {
function ie_scripts() {
echo '<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->';
echo ' <!-- WARNING: Respond.js doesn\'t work if you view the page via file:// -->';
echo ' <!--[if lt IE 9]>';
echo ' <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>';
echo ' <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>';
echo ' <![endif]-->';
}
add_action('wp_head', 'ie_scripts');
} // end if
从此处下载脚本并将其包含在您的主题中: https://github.com/scottjehl/Respond 解压缩下载并将respond.min.js文件移动到/ js /目录
我也相信你不应该把这些src添加到你的标题中。
我最近为我的主题添加了Bootstrap支持, 我唯一需要添加到标题中的是
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
我推荐http://bootstrapwp.com TUT,但他们付了钱。 但值得花钱!
在这里你可以阅读为什么你不应该入队header.php http://wpshout.com/everything-custom-scripts-styles-wordpress/
答案 1 :(得分:0)
我改变了这个。它现在正在运作。 <!--[if lt IE 9]> <script src="html5shiv.googlecode.com/svn/trunk/html5.js"></…; <script src="oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></…; <script src="oss.maxcdn.com/respond/1.4.2/respond.min.js"></…; <![endif]-->