If you’re creating a design portfolio website in WordPress – why, yes, much like this one – you may well want to include a handful of shots from your Dribbble account in order to show off your skills.

Happily enough this is quite straightforward with a jQuery plugin called Jribbble created by Tyler Gaw. There’s a ton of options available for working with the Dribbble API, but here we’ll just concentrate on the simple task of pulling in a few recent shots from an account and displaying them on a template.

First you’ll need to register an application via your Dribbble account, and grab the secret token it’ll generate, which is a simple numeric string.

Once you’ve downloaded the Jribbble source from Github, you can grab the minified version of the necessary JavaScript file, and place it wherever you keep your scripts in your theme – I’ll presume you have a /js folder for this purpose.

Next, we need to make the site actually pull in this file, of course doing it the WordPress way with a proper register and enqueue. If you only plan to output your shots on one page, you can go further and wrap the call to your script in a template conditional – I’m planning to just show my shots on the ‘About’ page, so I’m making sure to only load the script when that particular template is in use.

Now we’ve got the Jribbble script loaded, we just need to create an empty element to hold our shots, and invoke the plugin with the data we want back.

Remember to swap in your application secret token and set the username and number of shots you need. I’ve also wrapped a little Bootstrap markup around each shot for some quick and easy grid styling.

And that’s it! You can see mine on The About Page, and if you so wish follow me on Dribbble.

Posted in Design, WordPress