More Related Content
Similar to フロントエンドな人にこそ知ってほしいMTMLの話 (20)
More from Yasufumi Nishiyama (7)
フロントエンドな人にこそ知ってほしいMTMLの話
- 14. 記事がある場合
<a href= 01.html >記事タイトル①</a><br />
<a href= 02.html >記事タイトル②</a><br />
<a href= 03.html >記事タイトル③</a><br />
・
・
・
記事がない場合
<p>記事がありません</p>
ex. ブログ記事一覧
- 15. <?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?> >
<?php the_title(); ?></a><br />
<?php endwhile; ?>
<?php else : ?>
<p>記事がありません</p>
<?php endif; ?>
ex. ブログ記事一覧(WP)