WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've enabled custom posts types

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

The default post type is set on Standard, and it works for all but the Standard type, when I have a standard post the get_post_format() return empty. did I miss something in enabling them?

share|improve this question
up vote 5 down vote accepted

Because "Standard" is not a format itself - it simply implies that the post has no formats.

...which is somewhat deceptive, given it's listed in the Format meta-box as a format to choose

I think "standard" quite clearly implies what it means. If you're creating a site in which a post is never "standard", then fallback to a default:

if ( ! $format = get_post_format() )
    $format = 'gallery';

Alternatively, hook onto wp_insert_post and enforce a format if one has not already been set.

function wpse_58121_set_default_format( $post_id ) {
    if ( ! get_post_format( $post_id ) )
        set_post_format( $post_id, 'gallery' );
share|improve this answer
...which is somewhat deceptive, given it's listed in the Format meta-box as a format to choose. This ties into why it's it's not possible to remove the Standard "format" (bar the gymnastics in the accepted answer) even if you never intend to use it. – Su' Jul 11 '12 at 10:03
Check out my revision for some further comments on the matter. – TheDeadMedic Jul 11 '12 at 10:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.