#author("2022-04-10T12:16:48+00:00","default:admin","admin") -[[【WordPress】メインループとサブループを理解する:https://eg-tips.com/wordpress-loop/]] *メインループ [#j04999de] <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <!-- ループ処理(例) --> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> <?php endwhile; endif; ?> -if (have_posts()): 記事が存在するかチェック -while (have_posts()): 記事がある間は、処理を繰り返す -the_post() 次の記事情報を取得する *サブループ [#q8fec73d]