Entries tagged “wcpdx.”

How WordPress 3.0 will rock your portfolio

I couldn’t be happier that my WordCamp Portland 2009 presentation, WordPress-Powered Portfolios, will likely have the shortest shelf life of any presentation I’ve given. It’s a testament to the WordPress team (and open source projects in general) that the “hacks” I proposed only months ago have already blossomed into honest-to-goodness features.

In December, WordPress 2.9 introduced support for post thumbnails, eliminating the need for my custom meta hack. WordPress 3.0 (which should be released around May) will solve the problem of secluding portfolio content from your blog with the introduction of custom post types.

Instead of corralling your portfolio content with tools like “category excluders” or relying solely on nested pages (as I suggested), you’ll soon be able to create a custom “portfolio” post type in a supported and predictable fashion.

As Frank Bültge details on the WP Engineer blog, adding a whole new section to your WordPress sidebar will be a straightforward and extremely flexible process you can bake right into your theme. No crazy plugins or hackery required!

This change is exciting not only for the impact it will have on  sites like my own, but because it increases WordPress’ prospects as a hardy CMS solution.

All that’s left to render my presentation completely obsolete is a more robust and customizable gallery solution. I’ll be crossing my fingers.

Implement 2.9′s thumbnail feature in your WordPress-Powered Portfolio

WordPress 2.9 was unleashed upon the world last evening with a pile of killer features (image editing, anyone?).  Perhaps my favorite new feature is built-in support for thumbnails associated with a page or post.

When I discussed building WordPress-Powered Portfolios earlier this year at WordCamp Portland, you may recall my rather obtuse solution for supporting thumbnails. Basically, you were required to upload an image, copy its filename, close the media browser, create a new custom field called “tn,” and paste the filename into it.

No longer!

With support in your theme for 2.9′s post thumbnails, simply upload an image and assign it as the thumbnail with a single click (or through the handy new “Page Image” box in the lower-right corner). No custom fields to mess with, no copying and pasting filenames.

Implementing this feature in a portfolio already using my WordCamp functions is a three-step process.

  1. Tell WordPress that the feature is supported by adding addthemesupport('post-thumbnails'); somewhere in your theme’s functions.php file.
  2. Log in to WordPress and assign each of your portfolio items an image. If you’ve already used the “Upload/Insert” tool to add them prior to 2.9, just click the “Add an Image” button, then “Gallery,” “Show” the image you want to use and click the “Use as thumbnail” link toward the bottom.
  3. Adjust your functions to support the new feature. Refer to my updated list_work function snippet as an example.
Your mileage may vary depending on the volume of portfolio items you’ll need to switch over, but it took me roughly an hour to support the feature on this very site.

I recommend reading Justin Tadlock’s excellent blog post on the subject, which details the post thumbnails in much greater detail than WordPress’ documentation and was of great help to me in supporting them.

I do have one bit of extra theme development knowledge to bestow on other developers which I was unable to find elsewhere online. To echo only the URL of the thumbnail image file, use the following:

<?php echo get_post(get_post_thumbnail_id())->guid; ?>

WordPress-Powered Portfolios: The Movie

If you didn’t grab a ticket to WordCamp in time, missed the live stream and/or found my presentation slides seriously lacking in the audio department, you’re in luck! The video of WordPress-Powered Portfolios has been published to WordPress.tv, or you can watch it below.

A technical problem resulted in the footage starting a few minutes into my presentation. All you missed was an introduction of who I am, and of my background as a cartoonist.

I apologize for having to look down at my notes so often; I didn’t expect to be holding the microphone! Other than that, enjoy.

Watch the video on WordPress.tv

WordPress-Powered Portfolios: Slides & Snippets

WordCamp rocks!I really dig WordPress, but not nearly as much as I enjoy spending time with my fellow geeks and colleagues in Portland’s bustling and vibrant open source and web community. It was a pleasure presenting this afternoon!

My presentation was meant to solve the problem of simply and easily associating imagery with pages and/or posts in order to build a killer portfolio theme. I hope designers, artists and hobbyists will use these tips as a springboard for pushing what we can do with this constantly-evolving platform.

Thanks to all in attendance! Here are the goods.

Read the rest of this entry…