Skip to content

Instantly share code, notes, and snippets.

@benhuson
Created May 13, 2013 10:29
Show Gist options
  • Save benhuson/5567427 to your computer and use it in GitHub Desktop.
Save benhuson/5567427 to your computer and use it in GitHub Desktop.
WordPress Multiple Post Thumbnails plugin setup. Example of setting up a background image option.
/**
* Multiple Post Thumbnails (plugin compatibility)
* http://wordpress.org/extend/plugins/multiple-post-thumbnails/
*/
if ( class_exists( 'MultiPostThumbnails' ) ) {
$types = array( 'page' );
foreach ( $types as $type ) {
new MultiPostThumbnails( array(
'label' => _x( 'Background Image', 'admin', 'mytheme' ),
'id' => 'background-image',
'post_type' => $type
) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment