Multiple Post Thumbnails Plugin Broken (and Fixed)

The Multiple Post Thumbnails plugin is not working for me using WP 3.2.1.

Apparently the function can not determine the ID of the related post with the current setup, that happens around line 190, “public static function get_the_post_thumbnail”

My proposed solution is to change this:

global $id;
$post_id = (NULL === $post_id) ? $id : $post_id;

Wordpress Multiple Post Thumbnails Plugin Broken

to this:

global $id;
global $post;

$post_id = (NULL === $post_id) ? $id : $post_id;

if(!$post_id){
if(!empty($post->ID)){
$post_id = $post->ID;
}
}

Wordpress Multiple Post Thumbnails Plugin Broken Fix

It’s not 100% clean but it’s fairly easy to read and it work for me.

Related Posts:

  • No Related Posts
This entry was posted in Web Development and tagged , , . Bookmark the permalink.

One Response to Multiple Post Thumbnails Plugin Broken (and Fixed)

Leave a Reply

Your email address will not be published. Required fields are marked *