Picture of PHP code from a WordPress theme

Standard Post Format: The Forgotten Format

WordPress supports a variety of “post formats” that themes can use to help display different forms of content in different ways. On my current theme, I’ve been photoblogging, yet due to the joy of post formats, they’re all tidying in their own place (on the sidebar and at a special link). This is really cool to me since I can put more of my content out there without needing to register custom post types or worry about changing themes and having everything go to hell.

The problem came tonight when I needed to reactivate my MailChimp campaign. I didn’t want to annoy my subscribers with every silly picture taken while at a company meetup, so I disabled it. Since each post format has an URL in the style of /type/[post-format], so I assumed /type/standard would work for the standard post format.

It didn’t.

Surprised, I went looking for an answer.

The easiest solution I found was in #16149-core of all places.

This Trac ticket deals with exactly our dilemma, which is basically in a holding pattern of not getting fixed. Thankfully, Mark Jaquith and Nacin put together a ready-to-use plugin to enable querying by the “standard” post format, which will allow my pretty permalink to work, as a holdover.

Check out the code. If you want to use it on your own site, click the “Original Format” link at the bottom, upload it to your /wp-content/mu-plugins/ directory.

While surprised this isn’t in core in the first place, the community delivers nevertheless.

What’s great about this in my situation is it functions like any other query, so I can use a query string, like /?tag=monkey to display all standard-format posts that have a tag of “monkey” or tack on /feed/ to generate a RSS feed.

With that, I could update my MailChimp campaign feed to /type/standard/feed/, keep photoblogging, and not annoy everyone to unsubscribing in a day.





Leave a Reply