I’ve used custom post types to display portfolio items since WordPress 3.0 when they were first introduced.
Portfolios work well as a custom post types because they generally aren’t displayed in the regular feed (like posts), they usually need a taxonomy (which isn’t done in pages by default), and as a custom post type its easier to give them their own metaboxes (like a project link, or image).
However, if you register a “portfolio” post type directly with the theme- whenever you change themes you’ll need to copy over the code code. And since I just recently did this, I thought I might as well release my code as a plugin and let other folks do it as well.
What This Plugin Does
The Portfolio Post Type Plugin will:
- Registers a new portfolio post type
- Registers separate portfolio taxonomies for tags and categories
- Displays the portfolio image in the dashboard column view
What This Plugin Doesn’t Do
This plugin won’t handle any of the front end display of your post type. If you want to style those or change the layout, you’ll probably want to add archive-portfolio.php and single-portfolio.php to your theme.
When You Shouldn’t Use This Plugin
If you want your portfolio items to go out in the regular feed, or be displayed alongside posts- you’ll likely want to use post formats instead. With a post format you can set your post as an “image” or a “gallery”, and even display it differently on the front end using custom templates. Here’s a link to the codex about post formats.
How Does the Code Work?
I wrote a full explanation of the plugin code over here.