我遇到了一些問題。我的page.php似乎重寫了WooCommerce的購物車頁面。該頁面已被創建(由WooCommerce生成,短代碼完好),名爲Cart。Woocommerce的購物車頁面被我的Page.php頁面覆蓋在Wordpress中
我知道我的page.php文件被覆蓋了,但我不知道如何停止。這裏是我的page.php文件頁面的代碼:
<?php
get_header();
if (have_posts()) {
//Work with us page
$workwithuspage = "work with us";
$pitch = "pitch an idea";
$cart = "cart";
if($workwithuspage == strtolower(get_the_title()))
{
//Page stuff here!
$image = wpse_get_images();
?>
</div>
<div class="hero">
<div class="container heroImage" style="background-image:url('<?php echo $image->guid;?>');">
<div class="col-md-7"></div>
<div class="col-md-5">
<div class="pageText">
Work with Us
</div>
<div class="subText">
<?php echo $image->post_content; ?>
</div>
</div>
</div>
</div>
<div class="bodyBg">
<div class="container">
<div class="col-md-6">
<div class="box-style">
<div class="box-header">
Got a comic idea and want it published?
</div>
<div class="box-text">
Tell us your desires, so we can slap it on a comic book and sell it for millions. Ya dig?
</div>
<div class="box-button-container">
<?php
$pitch = get_page_by_title('pitch an idea');
?>
<a href="<?php echo get_permalink($pitch); ?>"><div class="button large">Pitch an Idea</div></a>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box-style">
<div class="box-header">
Want to work on one of our great titles?
</div>
<div class="box-text">
Tell us your desires, so we can slap it on a comic book and sell it for millions. Ya dig?
</div>
<div class="box-button-container">
<div class="button large">Find Jobs</div>
</div>
</div>
</div>
</div>
</div>
<div id="ourstandards">
<div class="coloroverlay">
<div class="container">
<div class="col-md-6">
<div class="pageHeaderText">
Our Standards
</div>
<div class="bodyTxt">
<p>
At On Target Network, we strive to promote consistency,
communication and passion in all areas of work and we expect the same of our artists.
</p>
<p>
We understand the nature of creators and seek to raise ourselves to higher and higher standards. To do that, we vet and
review series pitches with a carefully selected panel of writers and artists.
</p>
<br /><br />
<p>
Got questions? We'll be happy to help.
</p>
<div id="sendUsQ" class="secondaryBtn">
Send us your questions
</div>
</div>
</div>
<div class="col-md-6"></div>
</div>
</div>
</div>
<div class="container">
<?php
}
else if($pitch == strtolower(get_the_title()))
{
?>
</div>
<div id="pitchImg" class="hero">
<div class="container">
<div class="col-md-7"></div>
<div class="col-md-5">
<div class="pageText">
Pitch an Idea
</div>
<div class="subText">
<?php echo $image->post_content; ?>
</div>
</div>
</div>
</div>
<div class="bodyBg">
<div class="container">
<div class="col-md-12">
<div class="pageHeaderText dark">
Start your pitch here
</div>
</div>
<div class="col-md-9">
<?php
if (isset($si_contact_form)) {
echo $si_contact_form->si_contact_form_short_code(array('form' => '1'));
}
?>
</div>
</div>
</div>
<?php
}
}
get_footer();
?>
我有我想自定義頁面條件IFS,但我擔心在這樣做時,它已經覆蓋(在某種程度上)的車頁面。
你知道,我試圖做一個「其他」的聲明,看看購物車頁面將與'the_content工作()',但是,事實並非如此。 – Majo0od 2014-09-29 21:50:15
我的意思是沒有,這是一個空白的頁面。 – Majo0od 2014-09-29 21:50:35
另外,是否有創建不同頁面模板的最佳做法? – Majo0od 2014-09-29 21:52:13