내 샘플 Wordpress 테마 index.php 코드를 검토해 주셨으면합니다.Wordpress 테마
<?php
/*
Template name: Homepage
*/
get_header();
?>
<?php
if(isset($_GET['action'])):
$action = $_GET['action'];
switch($action){
case "sendmail": include("sendmail.php"); break;
case "mailsent" : include("thanks.php"); break;
}
else:
?>
<!-------// Begin Content ---------->
<?php if (have_posts()): ?>
<?php while(have_posts()): the_post(); ?>
<tr>
<td class="contentarea">
<h1><?php the_title(); ?></h1>
<p> <?php the_content(); ?></p>
</td>
</tr>
<?php endwhile; ?>
<?php else: ?>
<tr>
<td class="contentarea">
<h1>Page not Found!</h1>
<p>Sorry, you are looking a page that is not here! </p>
<?php get_search_form(); ?>
</td>
</tr>
<?php endif; ?>
<!-------// End Content ---------->
<tr>
<!--begin contact form -->
<td class="contactarea" height="200">
<?php include("contact_area.php"); ?>
</td>
<!--end contact form -->
</tr>
<?php endif;?>
<?php get_footer(); ?
나는 켜려고 내 경우에는 내가 방법을 모르는 같은 기능 무언가로하지만, 위의 진술 :
if(action_is_set()){
then_do_the_action();
}else {
//begin content..etc.
}
내가 아직이야? 위의 내 코드의 더 나은 구조가 있는가 PHP와 Wordpress 모두를 배우기. 제발, 도와주세요. 감사!!.
mythemeshop..visit에서 구입 한 모든 테마에서 60 % 할인 받으십시오. http://tech-papers.org/mythemeshop-coupon-code/ –