I have created a page on which I would like to run queries exlusively for one custom post type in the same way I’m using Category.php, Author.php and index.php to run queries for regular posts. I can’t seem to get anything to appear when I edit the page that is associated with the template I’ve created for this page, so I’ve edited the actual page template itself. This may or may not be related to the fact that I can’t get this page to behave like index.php does, i.e. providing a running list of posts until someone does a more refined search such as by Category.
I’m stumped – how can I get a page template to work just like index.php does, but for the custom post type only?
You want to use the template file
archive-{posttype}.php
to output an archive index of your Custom Post Type, and the template filesingle-{posttype}.php
to output a single Custom Post.Refer to the Codex entry for Template Hierarchy.