home.phpに、最新投稿のサマリ欄と、特定ページ(以下の場合ID=10)のタイトルと本文が表示されるようにした。
home.phpって、ホント便利。
というか、WordPressは、ホント柔軟! なんでもできるね。
<?php get_header(); ?>
<div class="art-content-layout">
<div class="art-content-layout-row">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?><div class="art-layout-cell art-content">
<!-- ニュース カテゴリの表示その2 ここから -->
<div class='art-post'>
<div class="art-post-body">
<div class="art-postmetadataheader">
<h2 class="art-postheader">
<img width="26" height="26" alt="postheadericon" src="<?php bloginfo('template_url'); ?>/images/postheadericon.png">
<?php _e('トピックス'); ?></a>
</h2>
</div>
</div>
<?php $posts = get_posts('numberposts=3&order=desc'); ?>
<div style="border: 1px solid lightSlateGray;margin: 0 10px;">
<ul>
<?php foreach($posts as $post): ?>
<li><?php the_time('Y-m-d') ?>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<!-- ニュース カテゴリの表示その2 ここまで -->
<!-- 特定ページの表示 ここから -->
<div class="art-post">
<div class="art-post-body">
<div class="art-post-inner art-article">
<h2 class="art-postheader">
<img src="<?php bloginfo('template_url'); ?>/images/postheadericon.png" width="26" height="26" alt="postheadericon" />
<?php
$page_id = 10;
$mes = get_page($page_id);
echo $mes->post_title;
?>
</h2>
<p>
<?php echo $mes->post_content; ?>
</p>
</div>
</div>
</div>
<!-- 特定ページの表示 ここまで -->
</div>
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
</div>
</div>
<div class="cleared"></div>
<?php get_footer(); ?>