Skip navigation

Entries Tagged ‘wordpress’

Feb 24

4

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.

Dec 19

3

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 add_theme_support('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; ?>

Sep 30

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.

Sep 19

9

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.

See the presentation and dig some PHP

Sep 16

3

WordPress-Powered Portfolios this Saturday

WordCamp Portland Speaker BadgeWow, time flies! I last wrote about WordCamp Portland back in June, and already the event is upon us. This coming Saturday, I’ll be closing the first day of the sold-out shindig at WebTrends with my presentation, WordPress-Powered Portfolios. (Don’t panic, they’re streaming it.)

My presentation won’t revolve around the visual design of portfolio sites for two important reasons:

  1. The principals of compelling interaction design are not exclusive to the WordPress platform.
  2. I’m still way too new at this to represent myself as any sort of authority on the art of portfolio design.

What you will learn is whether or not WordPress is the right platform for your online presence and, if so, the surprisingly simple snippets of PHP you’ll need to get there.

As excited as I am to present, I’m even more excited to see the other wonderful speakers, including WordPress founder Matt Mullenweg.

I was surprised and delighted to hear that the premier sponsor of the event is Microsoft. I acknowledge their generous support by drafting and publishing this post in their intuitive Windows Live Writer application.

See? WordPress brings people together.

Aug 16

5

I can’t stop tinkering!

I know, I know… I just updated this site. What can I say? Despite the profound sociological implications of the modern web I attempt to ponder each and every day, I’m still shocked at how much darn fun it can be to design for and develop in.

The updates this time around are much smaller and have trickled out over the last week. They include:

  • Shortened URLs (using my own custom sticka.us domain running YOURLS) for even easier tweeting
  • Related posts (powered by YARPP, see them at the bottom of the single post view)
  • Browser icons accompanying comments (geeky!)

My feelings regarding these additions can be expressed quite succinctly: “Whee!”

(Apologies to Scott McCloud for the title of this post.)

Update: It was pointed out that mobile browsers (in this case, Android) had been ignored, so I added a few. Here is the list of currently supported browsers, let me know in the comments if yours is left out:

  • Android
  • BlackBerry
  • Blogger (Pingbacks)
  • Chrome
  • Drupal (Pingbacks)
  • Firefox
  • Internet Explorer
  • iPhone
  • Konqueror
  • Opera
  • Safari
  • WordPress (Pingbacks)

Aug 07

2

Register for WordCamp Portland 2009

WordPress LogoRegistration for WordCamp Portland 2009 is now open! Any designer, developer or blogger will want to attend. The WordPress goodness happens September 19th through the 20th at WebTrends, and the ticket price is a bargain:

Tickets are $20 per person which includes access to the event, lunch on both days, snacks/refreshments, a T-shirt, some swag, and the ability to meet a couple hundred really great people including some really great speakers

In addition to my presentation on how to build a killer WordPress-powered portfolio, there will be armfuls of wonderful sessions from the likes of Micah Baldwin, Jason Grigsby, Cami Kaos and Dr. Normal, Will Norris, Scott Porad, Garron Selliken and Duane Storey.

As both a speaker and attendee, I urge you to relinquish a single Andrew Jackson for two full days of open source wonderment.

For more information, visit WordCamp Portland or @wcpdx on Twitter.

I’ll see you there!

Jun 15

1

Designers, developers and bloggers unite: WordCamp Portland is this September

WordPress LogoIt’s no secret that I dig WordPress. Heck, this very site is powered by it. In fact, that’s the subject of my session at this year’s WordCamp Portland: WordPress-Powered Portfolios.

A great summary of the event excerpted from Rick Turoczy’s Silicon Florist writeup:

Without a doubt, one of Portland’s favorite blogging platforms is WordPress. And why wouldn’t it be? It’s open source. It’s easy to tweak and extend. And it’s got a great developer community both here in town and throughout the world.

And there’s no better place to learn about using, manipulating, and generally mucking with WordPress than WordCamp Portland.

I’ll have more to say about my presentation as the event approaches (September 19-20 at WebTrends), but I have to point out how stellar my fellow speakers are: Micah Baldwin, Jason Grigsby, Scott Porad and Duane Storey. I think I’m even more excited to attend than to speak!

You can keep an eye on WordCamp Portland developments on their web site or on Twitter.

Jan 28

Smarter WordPress Comment Status

just-huhI love WordPress more and more with each release, and 2.7 takes the cake; I’ve never been a happier designer, developer or user of a CMS/blogging platform. As awesome as it is 95% of the time,  I did encounter a setback when developing this site’s theme, specifically in the behavior of comment links.

One of the goals of my site redesign was to open up opportunities for conversation, and journal comments are a significant part of that. As such, I wanted the links to the left of the journal items to behave in the following way:

  • If comments are open, always display a link to them or to the comment form.
  • If comments are closed, but the post has comments (presumably made before the closure), display the link.
  • If comments are closed, and the post has no comments, there isn’t any reason to maintain the link; don’t show it at all.

I wanted to customize the style and destination of the comment link a bit more than the usual comments_popup_link function would allow. I took some cues from the default theme and referenced $post->comment_status, resulting in the following conditional:

if (get_comments_number() || 'open' == $post->comment_status)  {
	Comment stuff...
}

Unfortunately, this had one flaw; any posts where the comments were closed as a result of WordPress’ “automatically close comments after x number of days” setting retained the comments link no matter what. While $post->comment_status appeared to work correctly in comments.php, elsewhere it would still return 'open' for those posts which had not been implicitly closed.

My solution was to create a function in my theme’s functions.php file called showCommentLink, which  checks the number of comments, post status and the automatic closure preference before returning a boolean (true for show, false for hide). Take a look:

function showCommentsLink($num,$status,$date) {
	// If number of comments is zero, check some other stuff
	if ($num <= 0) {
		// If comment status is not open, return false
		if ($status != 'open') {
			return false;
		}
		// If comment status is open, check if automatic closure is enabled
		$close = get_option('close_comments_for_old_posts');
		// If so, grab the number of days and compare
		if ($close) {
			$days = get_option('close_comments_days_old');
			$cutoff = strtotime("-$days days");
			$then = strtotime($date);
			// If this post's comment status is "expired," return false
			if ($then < $cutoff) {
				return false;
			}
		}
	}
	// If you've made it this far, return true
	return true;
}

And sample usage in The Loop:

if (showCommentsLink(get_comments_number(),$post->comment_status,$post->post_date))  {
	Comment stuff...
}

While definitely not the prettiest solution in the world, it appears to do the trick. Having $post->comment_status behave differently in different contexts seems like either an oversight on the part of WordPress developers or, potentially more likely, a sign that I am doing something a bit backwards.

What’s your take? See something I’m doing wrong or have a way to improve the function? Want to see me port it to a plugin for more streamlined use in The Loop? Think all this WordPress stuff is a waste of time when I could use Drupal instead? Let me know in the comments!

Dec 20

4

‘Tis the season to be relaunched

Welcome to the new Tyler Sticka dot com! This design has been a pet project of mine for quite a while now, and it is incredibly satisfying (not to mention cathartic) to finally unveil it.

The old site served me well, but there were many issues (both aesthetically and behind the scenes) I was enthusiastic to remedy.

Some highlights:

  • Simplified portfolio layout; explore any content (including 11 new pieces) that grabs you visually! No more narrowing down by category or duplicated content.
  • Greatly expanded journal, with more reader-friendly line lengths, better categorization and tagging, more usable archives and, most importantly, commenting!
  • A page full of extras, including some classic webcomics, downloads and links to products featuring my work. Also includes the brand new comic “Stan the Cat Goes Nuts!”
  • Progressive enhancement! Firefox, Opera, Chrome and Safari users will not be burdened with IE fixes and adjustments (hint, hint).

With WordPress 2.7 and it’s new, gorgeous UI, I’m looking forward to blogging more meaningfully, more often. I’ll be discussing new media (i.e., the web), technology, art, design, rock n’ roll and anything else with relevance and resonance.

This new phase of my online presence is just beginning, but let me know what you think so far. I’d love to hear from you!

Biography

Tyler Sticka is a designer, artist, speaker and educator specializing in identity-driven new media. Learn More

Twitter

Reading: My other iPad is a Kindle http://bit.ly/cVIHaF (2 hours ago)

Copyright © 2006-2010 Tyler Sticka. All rights reserved. (Version 10.20)