Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 Aug 3 '11 at 14:37
add comment

1 Answer

up vote 2 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
1  
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
add comment

Your Answer

 
discard

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.