Post formats have been around since WordPress 3.1. They specify the format applied to a content. Post formats are different from Post Types which specify the type of content : post, page or maybe a custom type like books or products.
The following Post Formats are supported :
- standard : post with title, date and author
- aside : post without title and data, with the hint “aside”
- link : post without title and data, with the hint “link”
- gallery : first picture of a native gallery and number of pictures in the gallery
- status : format like Twitter, with a gravatar
- quote : post without title and data, with the hint “quote”
- image : special format for photoblogging
- video : special format for videos
- audio : special format for audios
- chat : special format for chat logs
The WordPress theme Twenty Ten supports the standard, aside and gallery format. The new theme Twenty Eleven supports all formats, but video, audio and chat need to be activated by adding them to the post formats array in the theme file functions php :
// Add support for a variety of post formats
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image', 'chat', 'video', 'audio' ) );
They need to be styled further in the corresponding css-file.
To add the Post Formats in a child theme, you must ensure that the childtheme setup occurs after the parenttheme setup. This is the code :
function childtheme_setup(){
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image', 'chat', 'video', 'audio' ) );
add_action( 'after_setup_theme', 'childtheme_setup' );
The following list shows links to useful tutorials and documentation about WordPress Post Formats :
- WordPress Codex Post_Formats
- Twenty Eleven Post Formats – What Are They and Why Should I Care?, by Siobhan McKeown
- WordPress Post Formats Tutorial : Add Tumblr Style Features To Your Blog with WordPress 3.1, by Dave Moyer
- WordPress 3.1 Post Formats Reference, by Lisa Sabin-Wilson
Hereafter are some older posts about WordPress themes and templates :