奇数、偶数で背景色を変えたり、はじめの記事だけデザインを変更したりする方法です。 まずは基本のWordpressのループタグから 詳細>> <?php if(have_posts()): ?> <?php while(have_posts()): the_post();?> <h2><a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h2> <div><p><?php the_content(); ?></p> <p><?php the_category(); ?></p></div> <?php endwhile; ?> <?php else: ?> <p>投稿されたものがありません。</p> <?php endif; ?> これに、投稿記事の表示が何回目かわかるように変数と数える関数をいれます。 <?php i
![wordpressで記事を順番によってデザインを変更する方法](https://cdn-ak-scissors.b.st-hatena.com/image/square/3ba5f847cf642a686ea0bfea3e9d1d62789311ca/height=288;version=1;width=512/http%3A%2F%2Fwww.geekzshu.com%2Fwp-content%2Fthemes%2Fsango-theme%2Flibrary%2Fimages%2Fdefault.jpg)