In this series, I will be introducing you to WordPress post formats, dispelling some of the confusion surrounding them and showing you how to put theme to use in your themes.
Post formats may be misunderstood, and have a misleading name, but they are still one of the more powerful tools at a theme developer's disposal.
Once you understand post formats you will be able to use them to ensure that all of the different types of posts on a site that your theme is used on display properly, while avoiding using unneeded custom post types that limit data portability.
What Are Post Formats?
The best name for Post Formats, according to WordPress lead developer Andrew Nacin, would have been 'post types' except that would have been too easily confused with custom post types, so the name post formats was chosen.
As Mark Jaquith, another lead developer explained, custom post types "were poorly named. Think: Custom Content Types. That is, non-post content. A Post Format is a formatting designation made to a post."
Thinking of post formats as a type of post is the easiest way to understand their purpose. Post formats are not another type of taxonomy like tags or category, which are used to group posts by their content is about, post formats group content by what their content is.
A Design Tool, Not a Taxonomy
What's the big difference? If I create a post that contains text about why I think Empire Strikes Back is such a great film, and another about Luke Skywalker's origins, I might tag them both Star Wars, and the first one Films.
That's helpful for organizing my blog, especially once I add a third post about the movie Brazil that would also get the tag Films but not the Star Wars tag. Nothing about those tags requires any change in how I output the information.
Now imagine I add two more posts, one is a video of me reenacting all of Luke Skywalker lightsaber duels and the other is of my cat jumping in and out of a box. Now these two posts have something in common, even if they can't share the Star Wars or Films tags. They both have special formatting needs to ensure that the video and the text content of the post display properly together.
If both posts are assigned the post format "video" and then I have a variety of tools available to me to deal with these formatting and style issues regardless of the content. Most importantly that post format is a standard that all themes share.
What Post Formats Are Not
Standards Versus Custom Post Types
Could you accomplish similar results with custom post types or custom taxonomies? Yes you could, but when you do you lock users into your theme because as soon as they change themes the custom post types and custom taxonomies are no longer there. Custom post types are great, but they have no place in themes.
When custom post types exist in themes they create user lock-in as switching away from a theme with a "photos" custom post type to a standards compliant theme will lose the ability to display those photos.
In contrast, if a user's theme makes use of the images post format, and they switch to a new theme that doesn't support post formats, the images posts are still displayed by the default post template. Forcing a user to keep using your theme because switching themes will make it difficult to keep their content is a bad way to maintain user loyalty, as it[s loyalty earned begrudgingly.
Users should stick with your theme because it fits there needs, looks good, and has good support. Those are users that will be happy to stick with your theme or look first at your other theme offerings before seeking another developer's offerings.
One of the coolest parts of the work that has gone into post formats and media support in general, is the automatic embedding of media players in posts. There is no need to create meta fields for the source of video file in post, which many theme developers may be tempted to do, as WordPress will automatically create the appropriate media player from a link to a media file in post content. This sort of field creates the type of user lock-in that post formats were designed to help avoid.
What About Custom Post Formats?
There is no way to register a custom post format. Many theme designers dislike this, but the ability to add them, but that defeats the reason post formats exist: to create a standard.
What Happened to The Post Format UI?
One of the main focuses of WordPress 3.6 was the Post Formats UI. This major effort ended up being largely scraped after it stalled the development cycle. Along with a more prominent place in the post editor for selecting post formats were specialized functions for returning media from different post formats, as well as some meta fields for media source. The more prominent post format selector icons for post formats where moved to a smaller, less prominent location and the additional functions and meta data were scrapped.
Putting Post Formats To Use
Now that you understand what post formats are, you will need to learn how to use them in your your theme, which I will be covering in the next part of the series.
Also if you are worried about what to do about all of the posts you already have that should have a post format set, but do not, don't worry, I'll be covering how to bulk update post format as well.
I'll be showing you some other cool tricks for using post formats to improve your site as well, so be sure to read all the posts in this series in order to get the most out of post formats.
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post