Formatting Multiple add_theme_support Arguments

In my functions.php I have the following:

add_theme_support( 'post-thumbnails', 'html5', array( 'comment-list', 'comment-form', 'search-form' ) );

…which in WP 3.8.1 disables e.g. featured image (i.e. post-thumbnails).

My question is how to properly format all these support items in the add_theme_support function; is adding two separate function calls right or ‘wrong’?

add_theme_support( 'post-thumbnails' );
add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form' ) );

3 Answers
3

You need to use one add_theme_support() call for each feature. Per the Codex, the proper function call is:

add_theme_support( $feature, $arguments );

Leave a Comment