固定ページ-1段組のレイアウト

1段組のレイアウトを作成

  • 「page.php」を作成する
  • 「index.php」の中身を複製する(ソースをコピー&ペースト)
「page.php」を編集
  1. サイドバーを削除
  2. コメント部分を削除
  3. 投稿日時を削除
  4. その他、不要なソースを削除
<?php get_header(); ?>

<!-- ▼#content -->
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<!-- ▼.post -->
<div class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
</div><!-- ▲.post -->
<?php endwhile; endif; ?>
<!-- ▲#content -->

<?php get_footer(); ?>
クラス名を追加
<div id="content" class="page">
<?php get_header(); ?>

<!-- ▼#content -->
<div id="content" class="page">

<?php if(have_posts()): while(have_posts()): the_post(); ?>
<!-- ▼.post -->
<div class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
</div><!-- ▲.post -->
<?php endwhile; endif; ?>

</div>
<!-- ▲#content -->

<?php get_footer(); ?>
固定ページの横幅を指定
/* page */
#content.page {
	width: 100%;
}
ブラウザで確認