I'm creating new pages under Pages > Add new.

And creating my own page.php file from the ground up, what's the best way of displaying pages contents?

I guess not get_template_part( 'loop'), since there will be no posts, just static pages?

1 Answer 1


Actually, pages also use the loop to display contents, but there will only be one "post" to loop through. Pages are treated almost exactly the same way as single posts as far as reading and rendering content goes.

If you're creating your own page.php file for a theme, take a look first at how Twenty Ten is put together. It's always easier to learn from others than to reinvent the wheel.

  • I hope all will work fine, because there will be some nested loops as I want to display for example list of portfolio items on my page. Going to accept your answer in 3 minutes btw :) Thanks for help, Twenty Ten was very helpful. Commented Feb 24, 2011 at 21:25
  • 1
    If you have multiple loops, you might want to reference the Codex articles that have several examples of multiple loops in action.
    – EAMann
    Commented Feb 24, 2011 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.