WordPress add post format support not working

I am working on a theme and for some reason, add_theme_support( 'post-formats', ... ) is not working.

In my theme’s functions.php I have the following near the top:

Read More
function mytheme_setup() {
    // ...other functions

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

    // ... more other functions
}
add_action( 'after_setup_theme', 'mytheme_setup' );

add_post_type_support( 'post', 'post-formats' );

Yet, when I go to WordPress admin -> Posts -> Edit New Post or Add New Post, I do not see a box allowing me to select a post format. I tried putting add_post_type_support() inside mytheme_setup() function, but still the same result. Am I missing something?

Related posts

2 comments

  1. Add this to your child theme which over-rides what your parent theme supports.

    Post Formats for Posts

    add_action( 'after_setup_theme', 'wpsites_child_theme_posts_formats', 11 );
    function wpsites_child_theme_posts_formats(){
     add_theme_support( 'post-formats', array(
        'aside',
        'audio',
        'chat',
        'gallery',
        'image',
        'link',
        'quote',
        'status',
        'video',
        ) );
    }
    

    And here’s the result tested on the Twenty Twelve default theme.

    enter image description here

    You can also use the above code in your parent themes functions file however the 3rd parameter may not be needed.

    To add Post Formats to OTHER Post Types, you’ll also need to add one of the following code snippets on top of the code above.

    Post Formats for Custom Post Types

    To add Post Formats to Custom Post Types, also add this code to functions and swap cpt-name with the name of your Custom Post Type.

    add_post_type_support( 'cpt-name', 'post-formats' );
    

    Post Formats for Pages

    To add Post Formats to Pages, also add this code in functions.

     add_post_type_support( 'page', 'post-formats' );
    
  2. I had this same problem just now and was able to discover that it was solved by going up to the “Screen Options” dropdown in the upper-right of the admin page, next to the “Help” dropdown, and then checking the box next to “Excerpts”. Adding the add_post_type_support function to your functions.php file apparently just enables this checkbox to show up in the admin, but it is unchecked by default, so you still must check it.

    My apologies for answering an old post, but I did not see this answer mentioned here, and it is still quite relevant to other people who might be searching for an answer to this problem.

Comments are closed.