Difference between an archive and a page listing posts

Archive Page

An archive page is part of the WordPress Template Hierarchy, and is the template file WordPress uses to display the archive index list for a given post type. The custom post type archive template hierarchy is as follows:

  • archive-{posttype}.php
  • archive.php
  • index.php

WordPress uses the query parameters to output this page, and posts are output via the main/default query loop.

Advantages

  • Pagination works out of the box
  • No user intervention required to create/display; WordPress creates the archive index view automatically, based on register_post_type() parameter has_archive

Disadvantages

  • Pretty permalink might not be as pretty as you’d like – though you can modify it via register_post_type()

Custom Page Template

A custom page template can be used to display any arbitrary content. When used to display a listing of custom post-type posts, it does so using a secondary query loop.

Advantages

  • User control of pretty permalink, via static page permalink

Disadvantages

  • Pagination will not work out of the box, and must be fixed
  • User intervention required to create this page: create static page, assign page template

Leave a Comment