my name is ryan coughlin

some people teach, others cook, I create a web presence with a lasting impression.

Display wordpress posts on a page

September 14th, 2009

I have been searching for various articles and help to use WordPress to display a page full of your blog posts. I finally found out a source and it is going to be creating a custom page template in WordPress. If you want to read more on creating custom page templates, be sure to check it out.

The basic concept, will go as follows:

  • Create a new file and give it a name such as “allposts.php”
  • Paste the code below in the “allposts.php”
  • Upload the file to your theme directory
  • Create a new page in WordPress
  • To the right where you see Page Template, select the one you just created
  • Save and view the page. You should now be viewing your posts

Code that goes in to the “allposts.php” is below, this is an example from my site. The XHTML can be customized to the theme of your website.
The top section of code is where the name of the page template is defined. This will display on the page editor under the Page Template drop down.



Post by: on with comment(s). located in .

This is a standard way to display your WordPress blog posts on a page using custom page templates, you can alter your query by editing this line:


To read more on the WordPress query_posts(), check out the reading.