When using WordPress, you’re not limited to just Posts and Pages. Those are simply the default post types, and if you want more you can define your own.
I recently launched a site for a client called Flatbooks, which sells eBooks online, and the feature I’d like to highlight how you’d set up your own ebook custom post type.
Registering the Post Type
Registering a custom post type is pretty easy. For all the documentation, please see the Codex.
If you need help writing the code, here is a Custom Post Type Generator that will let you fill out a form to generate the proper code.
As this was an eBook, there were a lot of post meta boxes that weren’t needed (Excerpt, Trackbacks…). But, there was some additional information that would be needed. So the next step was to add an eBook-specific meta box. Here’s my post on Custom Metaboxes.
Coding with Custom Post Types
In our code above we set
'has_archive' => true. This makes an archive available at yoursite.com/ebook. You can customize this using the archive-ebook.php template file. For single posts, use single-ebook.php.
These techniques allow you to create logical divisions of content and context-specific meta information boxes. It makes it easier for the end user to enter data because they know where to go and what data is needed.