The WordPress Loop — a practical guide to WordPress Loop with clear examples you can reuse in real projects.
WordPress Theme Development Series (22/96). Prefer one article? Read the complete WordPress theme development tutorial.
Short description
The Loop checks `have_posts()`, sets up post data with `the_post()`, then prints tags like `the_title()` and `the_content()`.
Standard Loop
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_title('<h2>', '</h2>'); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>