固定ページ-1段組のレイアウト
1段組のレイアウトを作成
「page.php」を編集
- サイドバーを削除
- コメント部分を削除
- 投稿日時を削除
- その他、不要なソースを削除
<?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%; }