WordPressで最近使用しているスタイル規則。
<?php get_header(); ?>
<div class="container">
<div class="content row">
<div class="side col-lg-3">
<?php get_sidebar(); ?>
</div><!-- .side -->
<div class="main col-lg-9 ">
<div class="static-page">
<div class="static-page__title">
<h1><?php single_post_title(); ?></h1>
</div><!-- .static-page__title -->
<div class="static-page__body">
<?php if( have_posts() ) : while( have_posts() ) : the_post() ?>
<div <?php post_class( 'static-post clearfix' ); ?>>
<div class="static-post__body">
<?php the_content(); ?>
</div><!-- .static-post__body -->
</div><!-- .static-post -->
<?php endwhile;endif; ?>
</div><!-- .static-page__body -->
</div><!-- .static-page -->
</div><!-- .main -->
</div><!-- .content -->
</div><!-- .container -->
<?php get_footer(); ?>
クラスsome-pageクラスでページ全体のスタイル指定する。
/* -------------------------------------------------------------------
# 固定ページレイアウト static-page
------------------------------------------------------------------- */
.static-page {
.static-page__title {
/* スタイル */
}
.static-page__body {
/* スタイル *?
}
}
クラスsome-postで各投稿のスタイルを指定。
/* -------------------------------------------------------------------
# 固定ページ投稿スタイル static-post
------------------------------------------------------------------- */
.static-post {
/* 固定ページ投稿のスタイル */
}
No comments yet.
改行と段落タグは自動で挿入されます。
メールアドレスは表示されません。