Best Way To Create Indices for Custom Post Types
-
Hi everyone,
Something that has been getting at me lately as I use WordPress to develop more and more is how to best create indices for my custom post types.
Say for example I’m building the ever popular “Library” page and I want a custom post type of “Book”. What is the best way to create a page that will just list all of the “Books” on my site?
Right now, I create a new Page and I link it to a page template that I have created that has a “query_posts” where I just specify the post type. This is nice because then I can easily add these pages to my menus.
I use the single-book.php template where I can, but I am a bit curious if something like this exists for the index of a page. Should I just create a file, call it index-book.php and give it a template name and continue the way I am doing it?
Thank you,
–d
- The topic ‘Best Way To Create Indices for Custom Post Types’ is closed to new replies.