Getting MPT to appear on an array on Custom Post Types
-
I’m trying to get my script to use MPT on various Custom Post Types I had developed. Problem is if I do it this way in my functions.php:
if (class_exists('MultiPostThumbnails')) { new MultiPostThumbnails( array( 'label' => 'Thumbnail Image (240x200)', 'id' => 'thumbnail-image', 'post_type' => 'drink', 'post_type' => 'food' ) ); }
It will only display a MPT for the food post type and ignore the drink one.
So I tried an array like this:
if (class_exists('MultiPostThumbnails')) { new MultiPostThumbnails( array( 'label' => 'Thumbnail Image (240x200)', 'id' => 'thumbnail-image', 'post_type' => array( 'culture', 'food', 'film', 'music', 'art', 'fashion', 'photography' ) ) ); }
That simply didn’t work at all.
So how can I make this work for all my custom post types? It’s very important!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Getting MPT to appear on an array on Custom Post Types’ is closed to new replies.