blog page showing only first post

It appears that blog.php is a custom static page template, yes?

If so, then the primary loop will display the post content of the static page to which it is applied.

If you want to create a custom page template that displays blog posts, you will need to create a secondary loop to query/output the required blog posts. I would say to follow the example in the Codex, but in this case: don’t. That example currently uses query_posts(), which is an incorrect implementation.

However: I suspect that what you’re really trying to do here is to customize your blog posts index? If so, you shouldn’t be using a custom page template at all, but rather, should be creating/modifying the appropriate template file, which, for the blog posts index, is (in order of priority):

  • home.php
  • index.php

Leave a Comment