Difference between an archive and a page listing posts

I am wondering what is the difference between a wordpress archive page, and just a page template listing out posts?

Right now I have a custom archive page, listing all entries of a custom post type. This could very well have been handled by just a normal page.

Read More

Right now I am going to list out all blog posts (not on the front page, but as a news option in the menu), and I am wondering if I should use an archive page or create a page template that lists out posts. What is the different in intent for these pages?

Related posts

2 comments

  1. 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
  2. Assuming these are going to be all posts within your posts section, and not excluding any, why not create a page in WordPress called “News” and then set that to as your “Posts Page” in Settings -> Reading? (I would have left this as a comment, but it won’t let me unless I have a reputation of 50).

    The Template Hierarchy may contain some useful information for you as well. I believe in most cases the normal content loop and archive loop are the same, with the archive template it has the variable Page title (ex: “Daily Archives:” “Category Archives:”) and you can also create additional archive templates based on different data (like post type, specific category, etc).

    Hope that helps!

Comments are closed.