Created
May 13, 2013 10:29
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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