enable multiple featured images
|Reported by:||doughamlin||Owned by:|
Currently featured images can be enabled by calling add_theme_support and passing in the post types for which you would like to enable them.
add_theme_support( 'post-thumbnails', array( 'post' ) );
However, each post can have only one featured image. There are many instances in theme development in which you want to be able to call multiple images that have been explicitly defined by the site editor. Currently the Multiple Featured Images plug-in http://wordpress.org/plugins/multiple-featured-images provides this functionality, however it feels like a hack and something that should be native. The plug-in also uses the old WordPress media upload interface, leading to an inconsistent experience.
The number of featured images could simply be another argument to add_theme_support
add_theme_support( 'post-thumbnails', array( 'post' ) ); add_theme_support( 'post-thumbnails', array( 'project' ), 3 ); add_theme_support( 'post-thumbnails', array( 'person' ), 2 );