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.

121 thoughts on “ Portfolio Post Type ”

  1. I am using Portfolio Post Type with the Portfolio Press theme since there are ready-made templates. The portfolios are being used to feature artists, artisans and musicians for our upcoming Summer art show. We are also featuring our show sponsors in the portfolio section. The problem is that when using the navigation arrows inside the “single-portfolio.php” template, there is no separation between the artists and sponsors. I would prefer to have them in separate sections.

    If I were to duplicate the plugin folder to create a “Sponsor” custom post type, which files would I need to modify? I assume most of the heavy listing is done by “portfolio-post-type.php” but there are other files inside the “includes” folder. Obviously I would need to create content-sponsor, single-sponsor and archive sponsor templates. I am working inside a child theme so there is no danger of the files being overwritten.


  2. Hi, I just did a bunch of updates last night and now the portfolio items don’t show up on the home page (as they used to). There is just one light grey box with a picture symbol (mountains and sun) in it where before it displayed my 9 portfolio items. How can I get this working again? Many thanks in advance!

  3. I’m not sure what happened, but my portfolio press portfolio tag and categories navigation is suddenly missing. I can’t alter or add anything to the wp nav menus. I wonder if it was something that got lost in updates? Any help or advice you or anyone reading might provide would be awesome.

  4. I´m building a site with the story template and the portfolio plugin. Im using the qTranslate X to have the site in Norwegian (main) and in English. Almost everything seems to work fine except the Portfolio gallery page. Once you open a product [:NO]NORGRIP SKLISIKRING[:EN]NORGRIP ANTI-SLIP[:] this this comes up. If I do press reload page it disappears and works perfectly. Could you please help me?

    web page name is http://www.glassfiber.no

    Thank you so much

    1. It should work with all permalink structures. Make sure you don’t have any other plugins or pages trying to use the same slug. Also, try re-saving your permalinks.

  5. Hi!

    thank You for this perfekt working plugin!
    I want to chance the word ‘portfolio’ in the browser path.
    Is this possible? Do You have any idea?

      1. Thanks for the plugin.
        How do I apply your answer?
        I’ve tried this:

        apply_filters( 'portfolioposttype_category_args', array('rewrite'=> array( 'slug' => '' )));

        Didn’t work.

  6. Hello Devin,

    Thank you for the awesome plugin, and Portfolio Press theme. I’ve been tweaking your theme to fit my purposes, and I’m hoping you can point me in the right direction. Right now I’ve got a static home page that is using a modified version of your full-width-portfolio template to display four image thumbnails that link to different portfolio_category pages. There’s a carousel I’d like to use that only works with image galleries, so I’m trying to figure out how to get the full-width-image-gallery-formats template to act similarly to those /portfolio_category/ pages.

    The simplest way I can think of (although not the most elegant) is to make different templates (based on your image-gallery template), in which I modify the WP_Query to return the appropriate items. To that end, can you tell me how I might access the portfolio post type category taxonomy in WP_Query?

    Thank you for your time.

    – Jordan

  7. Hi. I just installed your plug in because I wanted to assign different pages to different portfolio categories. I can’t seem to be able to assign a specific portfolio category to a certain page. My theme (scope) still only allows me to select a general portfolio and your plug in did not add further detail so that I can select the specific portfolio category I want displayed.

    Does the plug in not function this way?

    1. The plugin automatically creates archives for the portfolio categories. Go to you Menu admin, check the “Screen Options” tab and make sure the “Portfolio Category” box is checked, and then you should be able to add those to your menu (and find the URL!).

  8. I’m so sorry I’m a bit of a newby at this. I’ve followed all the instructions and my portoflio page looks fantastic! I’d just like to make one change to the style which I know involves code, I’d like to have the images in full colour all the time without having to hover over them for them to be in full colour. Would you be able to help me at all?

  9. Thank you for your plugin! Wonderful job!

    I have some problems and wishes:

    1. Icon of plugin parameters and options in screen options is missing
    2. I use Masonry Mode Gallery in Columned item type. But that all correctly displayed I have to choose Item type – “Side portfolio”, then I turn to the section “Side Portfolio” and check the checkbox – “Masonry Mode Gallery”. Then I must publish post, and then I choose “Columned” Item type and again publish post ;) Unfortunately the only right way to do Masonry Mode Gallery in Columned item type.
    Add please checkbox “Masonry Mode Gallery” for Columned item type
    3. Very slow scrolling in “portfolio gallery” section.

    also in new versions I would like to see the ability to bulk add photos.

Leave a Reply

Your email address will not be published. Required fields are marked *