此代碼來的主題,它的假設刪除頁眉和頁腳,但不這樣做。我可以添加什麼來使其工作?由於爲什麼不是這個PHP代碼刪除頁眉和頁腳?
我試着從以下頁面http://www.mobiletechrx.com/tuts3/刪除它,但它不會似乎沒有呈現這些元素。謝謝!
<?php
/**
* Template Name: No Header Or Footer Page
*/
?>
<?php get_header(); ?>
<?php while (have_posts()) : the_post(); ?>
<section style="background-image: url()" class="banner alternate_page">
<div class="container">
<div class="main_cap">
<div class="caption">
<h2>
</h2>
</div>
</div>
</div>
</section>
<section class="north_america default_page_with_sidebar">
<div class="container">
<div class="fullwidth_part">
<?php the_content(); ?>
</div>
</div>
</section>
<section class="mobiletech_built mobiletech_built_cutom">
<div class="container">
<div class="title_2">
<h2></h2>
</div>
<ul>
</ul>
</div>
</section>
<?php wp_reset_query(); ?>
<?php endwhile; ?>
<?php get_footer(); ?>
當我看一下網頁的HTML源代碼,你表明,它與<部分直接開始,以結束。所以我不明白你想要什麼。你能否以更好的方式解釋? – Peter
我只想頁腳和頭去掉,如果這是HTML的id做快,但它的WordPress的,我不知道如何刪除它們。我粘貼的PHP文件是刪除頁眉和頁腳,只顯示身體,但它不工作。林沒有太多的專家在PHP中,對不起,如果我有點模糊。 –
此模板可能是主題特定的。主題的頁眉和頁腳文件可能會檢查您正在使用的模板,並隱藏某些元素。你使用這個文件的原始名稱,它的主題是什麼?你可以發佈主題的名稱,如果它是公開可用的主題? – Matt