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?
Because “Standard” is not a format itself – it simply implies that the post has no formats.
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:
Alternatively, hook onto
wp_insert_post
and enforce a format if one has not already been set.