WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a custom post type in wordpress and have 90% of the functionality working correctly, but I am having a bit of trouble trying to create a custom listing page template.

Currently it is using the default index.php page to bring out all the posts and I have tried to override this by creating a page-post-type.php page but didn't seem to work.

What would be the best method for creating a custom post type listing page?

Cheers, Jamie.

share|improve this question
wprecipes.com/… – Tim Bezhashvyly Aug 3 '11 at 14:37
up vote 3 down vote accepted

I think you want to create archive page for custom post type, create archive-{post_type}.php and it'll display you custom post type content.

Also see codex: http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display

share|improve this answer
Note that if you've named your custom post type post-typename instead of post_typename, it won't work. The hyphen (-) in template names separates the properties that map to the template file, and custom type names that include a hyphen break the mapping. – marfarma Aug 4 '11 at 17:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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