@zRrr

Из-за чего съезжает get_header()?

На этой странице http://нужные-вещички.рф/cart/ мета и линки съезжают в body, хотя должны быть в head. И сразу после body появляются некие переносы строк, из-за которых образуется полоса сверху.
Часть кода самой страницы:
<?php /* Template Name: Корзина */ ?>
<?php get_header(); ?>
<section class="page-content">
			<div class="container">
	            <div class="row">
					<div class="col-md-12">
						<ul class="page-menu">
							<li><a href="<?php echo home_url(); ?>">Главная</a></li>
							<li class="active"><a href="#">Корзина</a></li>
						</ul>
					</div>
				</div>

В header.php мета и линки находятся в head, как подобает.
При вызове get_header() на других страницах, все работает корректно.
часть от header.php
<?php session_start(); ?>
<!doctype html>
<html class="no-js" lang="">
    <head>
	    <meta name="yandex-verification" content="35fba3e65263e93c" />
 <meta name="google-site-verification" content="oDNodHtTwmZVkGaGW9k_2HgOcyjkCmXHmPN8XVQPznU" />
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.png">
<title><?php if(is_home()){?>Интернет магазин, новости, статьи, рейтинги , обзоры<?} else { wp_title(' | нужные-вещички.рф',true,'right'); }?></title>

        <?php if(is_home()){?><meta name="description" content="
		Покупка товаров, бесплатная доставка при стоимости товара больше 500-ста рублей. Интернет магазин, новости, статьи."><?}?>
        <meta name="keywords" content="Интернет,магазин,новости,статьи,низкие,цены,справочная информация,Краснознаменск,<? wp_title(''); ?>">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- favicon
		============================================ -->		
        <link rel="shortcut icon" type="image/x-icon" href="<?php echo get_template_directory_uri(); ?>/img/favicon.ico">
		<!-- Google Fonts
		============================================ -->		
       <link href='https://fonts.googleapis.com/css?family=Raleway:400,600' rel='stylesheet' type='text/css'>
       <link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
       <link href='<?php echo get_template_directory_uri(); ?>/style.css' rel='stylesheet' type='text/css'>
		<!-- Bootstrap CSS
		============================================ -->		
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.min.css">
		<!-- Font awesome CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/font-awesome.min.css">
		<!-- owl.carousel CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/owl.carousel.css">
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/owl.theme.css">
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/owl.transitions.css">
		<!-- nivo slider CSS
		============================================ -->
		<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/nivo-slider.css" type="text/css" />
		<!-- meanmenu CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/meanmenu.min.css">
		<!-- jquery-ui CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/jquery-ui.css">
		<!-- animate CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/animate.css">
		<!-- main CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/main.css">
		<!-- style CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/style.css">
		<!-- responsive CSS
		============================================ -->
        <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/responsive.css">
		<link rel="stylesheet" href="<?php bloginfo( 'template_url' ); ?>/woo.css" type="text/css" media="screen" />
		<style>
		.main {
    background: #aaa url(../images/bg.jpg) no-repeat;
    width: 800px;
    height: 600px;
    margin: 50px auto;
}
.panel {
    background-color: #444;
    height: 34px;
    padding: 10px;
}
.panel a#login_pop, .panel a#join_pop {
    border: 2px solid #aaa;
    color: #fff;
    display: block;
    float: right;
    margin-right: 10px;
    padding: 5px 10px;
    text-decoration: none;
    text-shadow: 1px 1px #000;

    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border-radius: 10px;
}
a#login_pop:hover, a#join_pop:hover {
    border-color: #eee;
}
.overlay {
    background-color: rgba(0, 0, 0, 0.6);
    bottom: 0;
    cursor: default;
    left: 0;
    opacity: 0;
    position: fixed;
    right: 0;
    top: 0;
    visibility: hidden;
    z-index: 1;

    -webkit-transition: opacity .5s;
    -moz-transition: opacity .5s;
    -ms-transition: opacity .5s;
    -o-transition: opacity .5s;
    transition: opacity .5s;
}
.overlay:target {
    visibility: visible;
    opacity: 1;
}
.popup {
    background-color: #fff;
    border: 3px solid #fff;
    display: inline-block;
    left: 50%;
    opacity: 0;
    padding: 15px;
    position: fixed;
    text-align: justify;
    top: 40%;
    visibility: hidden;
    z-index: 10;

    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);

    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border-radius: 10px;

    -webkit-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset;
    -moz-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset;
    -ms-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset;
    -o-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset;
    box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset;

    -webkit-transition: opacity .5s, top .5s;
    -moz-transition: opacity .5s, top .5s;
    -ms-transition: opacity .5s, top .5s;
    -o-transition: opacity .5s, top .5s;
    transition: opacity .5s, top .5s;
}
.overlay:target+.popup {
    top: 50%;
    opacity: 1;
    visibility: visible;
}
.close {
    background-color: rgba(0, 0, 0, 0.8);
    height: 30px;
    line-height: 30px;
    position: absolute;
    right: 0;
    text-align: center;
    text-decoration: none;
    top: -15px;
    width: 30px;

    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -ms-border-radius: 15px;
    -o-border-radius: 15px;
    border-radius: 15px;
}
.close:before {
    color: rgba(255, 255, 255, 0.9);
    content: "X";
    font-size: 24px;
    text-shadow: 0 -1px rgba(0, 0, 0, 0.9);
}
.close:hover {
    background-color: rgba(64, 128, 128, 0.8);
}
.popup p, .popup div {
    margin-bottom: 10px;
}
.popup label {
    display: inline-block;
    text-align: left;
    width: 120px;
}
.popup input[type="text"], .popup input[type="password"] {
    border: 1px solid;
    border-color: #999 #ccc #ccc;
    margin: 0;
    padding: 2px;

    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    -ms-border-radius: 2px;
    -o-border-radius: 2px;
    border-radius: 2px;
}
.popup input[type="text"]:hover, .popup input[type="password"]:hover {
    border-color: #555 #888 #888;
}
		</style>


		
		<?php wp_head(); ?>
    </head>
    <body>
	<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-104088788-1', 'auto');
  ga('send', 'pageview');

</script>
			 <!-- popup form #1 -->
        <a href="#x" class="overlay" id="login_form" style="z-index: 10;"></a>
        <div class="popup">
		<form action="<?php echo get_template_directory_uri(); ?>/registration/testreg.php" method="post" >
            <h2>Авторизация</h2>
  • Вопрос задан
  • 259 просмотров
Решения вопроса 1
Судя по символу, что прислал ответивший выше - вы сохраняете файлы, при редактировании, в UTF-8, а надо в UTF-8 without BOM
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы