TheTechExpress is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Learn more

How To Enable WordPress Post Formats In Thesis

I’ve been playing around with, and testing, WordPress 3.2 Release Candidate 2 since its release on June 24, 2011. With the arrival of WordPress 3.2 with new default theme – Twenty Eleven, lots of people are going to all of a sudden become aware of post formats. Adding theme support for Post Formats is not overly complicated – it’s a quick function added to your Theme Functions (functions.php) file, after you decide which types of formats you are planning on using.
Enable WordPress Post Formats In Thesis
According to me post formats are awesome because they extend WordPress’ flexibility too much. You can easily transform the default twenty-eleven theme into a photo blogging theme, a micro blogging theme and a tumblog with absolutely no changes to the code and this represents a fantastic step forward. There are eight different post formats: aside, gallery, link, image, quote, status, audio, chat. As this is awesome feature are not enable in Thesis theme, here is a small trick.

How To Enable WordPress Post Formats In Thesis

WordPress post formats can be enabled via thesis theme’s custom functions file with one or 2 lines of code. It would probably actually be faster to just open your custom-functions.php file and write or paste it in.
Use below code to enable all the post formats:

add_theme_support( 'post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'audio', 'chat', 'video'));

Here are going to be utilizing the conditional tag: has_post_format()

if ( has_post_format( 'aside' ) {
// code to display the aside format post here
} else if (has_post_format('gallery')) {
// stuff to display the gallery format post here
} else if (has_post_format('link')) {
// stuff to display the link format post here
}else {
// code to display the normal format post here
}

Now you can style any design element for each of your post formats, as well as add or remove elements.

Manish Patel

Founder of TheTECHExpress. I Writes news about Blogging, Wordpress, Technology, Making Money Online. Connect on Twitter @techexpresslive

1 thought on “How To Enable WordPress Post Formats In Thesis”

  1. How do we style the design elements? In particular, how do we add the labels for “ASIDE”, “QUOTE”, etc. as they appear in Twenty Eleven?

    Further elaboration, or a tutorial on this subject would be much appreciated!

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.