2017-04-15 89 views
0

我對WP很新,並且正在嘗試使用它來學習一些HTML5/CSS/PHP。目前我有一些麻煩。 我創建了一個自定義頁面(只有一個乾淨的空白頁面,沒有頁眉等),並且我還創建了一個應該能夠響應的聯繫表單7 ..但是這不起作用。當我在手機上加載時,它不會調整。創建自定義模板WordPress的 - 沒有反應

這是模板頁面的代碼:

<?php 
/** 
* Template Name: Blank Page Header 
* 
*/ 
?> 


<!DOCTYPE html> 
<html <?php language_attributes(); ?>> 

<head> 
<meta charset="<?php bloginfo('charset'); ?>" /> 
<meta name="viewport" content="width=device-width, initial-scale=1" /> 
<link rel="profile" href="http://gmpg.org/xfn/11"> 
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>"> 

<div id="logo2" align="center"><img src="http://adventoury.com/wp-content/uploads/2017/04/IMG_20160507_153704_HDR-Recoveredcropped2.jpg" width="100%" ></div> 
<br> 




<!-- page title, displayed in your browser bar --> 
<title><?php bloginfo('name'); ?> | <?php is_home() ? bloginfo('description') : wp_title(''); ?></title> 

<!-- add feeds, pingback and stuff--> 
<link rel="profile" href="http://gmpg.org/xfn/11" /> 
<?php wp_head(); ?> 

</head> 

<body id="top"> 
<div class='container_wrap' id='main'> 
<div class='container'> 

<?php if (have_posts()) : ?> 
<?php while (have_posts()) : the_post(); ?> 
<?php the_content(); ?> 
<?php endwhile; ?> 
<?php endif; ?> 

</div> 
<?php get_template_part('page-parts/general-after-wrap'); ?> 
<?php wp_footer(); ?> 
</body> 
</html> 

這是使我從響應

@media only screen and (min-width: 48em) { 
    .column-half{ 
     width: 50%; 
    } 
} 

我缺少的東西的CSS?

親切的問候!

+0

請提供該網站的實際HTML源代碼的引擎收錄文檔。我80%確定CSS沒有加載,或者HTML頭部有語法錯誤。 如果您向我們提供實際網站的鏈接,那會更好。 –

回答

0

你只需要添加該代碼模板

<?php 
/** 
* Template Name: Blank Page Header 
* 
*/ 
get_header(); 
?> 

<div class='container_wrap' id='main'> 
<div class='container'> 

<?php if (have_posts()) : ?> 
<?php while (have_posts()) : the_post(); ?> 
<?php the_content(); ?> 
<?php endwhile; ?> 
<?php endif; ?> 

</div> 
<?php get_template_part('page-parts/general-after-wrap'); ?> 
<?php get_footer(); ?>