Custom Post Type Archives & URLs

Templates and Heirarchy

Default WP archives for Custom Post Types

Here’s one little gem for accessing default genearted archives if you are using WordPress 3.1 or higher:

This should query for “all custom posts about the theme named taco”.

Plugin: Custom Post Type Archives

Enables pretty permalink custom post type archives that will support both paging and feeds. All fully customizable.

Since version 3.1 WordPress has it’s own implementation of custom post type archives so you can create them without this plugin – visit this page for more info -> Nevertheless I do believe that this plugin is more flexible and you can still use it and it will still work as expected.

If you’re a theme developer, then you’ll be glad to know that this plugin also provides you with two highly useful functions:

  • is_post_type_archive – Similar to is_category or is_single, it will return true if this page is a custom post type archive or false if it isn’t.
  • get_the_post_type_permalink / the_post_type_permalink – This is used to return or echo the permalink for the post type.

A good article by Jonathan Christopher

Revisiting Custom Post Types, Custom Taxonomies, and Permalinks

Mind Blowing article on templates for Taxonomies and Custom Post Types

Make a Template for Taxonomies & Post Type Archives


There are no revisions for this post.

Tags: , ,

No comments yet.

Leave a Reply