WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Post Thumbnails
[resolved] Plug-in doesn't seem to work in WordPress 3.2.1 (11 posts)

  1. Benjamin_Thomas
    Member
    Posted 2 years ago #

    Hi,
    I've uploaded this plug-in and activated it, but I cannot see the option to add a second thumbnail in the post editor.

    I'm using version 3.2.1, is there anything I can do to modify the plug-in to make it work.

    Any help would be great!
    Thanks very much.
    Ben.

    http://wordpress.org/extend/plugins/multiple-post-thumbnails/

  2. xeth23
    Member
    Posted 2 years ago #

    Hi man, i have the same problem... did you ever find a solution?

  3. Chris Scott
    Member
    Plugin Author

    Posted 2 years ago #

    Give this version a try and let me know if it works: multi-post-thumbnails.php

  4. xeth23
    Member
    Posted 2 years ago #

    Thanx Chris for answer... but I try and it doesn't run... but I think I probably wrong something... probably point 3 of ur intallation guide:

    Register a new thumbnail for the post type you want it active for. If post_type is not set it defaults to post.

    if (class_exists('MultiPostThumbnails')) { new MultiPostThumbnails(array( 'label' => 'Secondary Image', 'id' => 'secondary-image', 'post_type' => 'post' ) ); }

    where do I have to put it?

  5. Chris Scott
    Member
    Plugin Author

    Posted 2 years ago #

    @xeth23: put that in your functions.php of your theme.

  6. shirgans
    Member
    Posted 2 years ago #

    Hi,

    I think (&hope) I found the problem.
    I tried to trace how your plugin stores the thumbs images reference values (very smart by the way). And found that on some cases (can't tell when), the values are not stored, and an invalid (broken) reference is stored (to an none exist post id). and while you try re-upload the image the values stays the same and not changed.

    So what I've done to fix this, is moving just one line of code, as follow..
    on public function set_thumbnail, add the following line, just after where you get the thumbnail_id:
    delete_post_meta($post_ID, "{$this->post_type}_{$this->id}_thumbnail_id");
    You could also remove that line where it is now, few lines below, but it isn't a must.

    Hope that helps.

  7. gaspas
    Member
    Posted 2 years ago #

    Hello Chris, nice plugin very useful, thanks.

    I had the some problem, i think, i install and work after a few changes in admin stop to work in some cases.

    My problem it's caused whem i remove the images from media library to generate new thumbnails.

    The wp remove the image reference in the box but the ID reference keeps in the custom_field and because of that it doesn't let save a new image even if the box of second image is empty.

  8. shirgans
    Member
    Posted 2 years ago #

    @gaspas, try to use my fix above, I think it should work for you.

  9. michael_rtm
    Member
    Posted 2 years ago #

    @Chris Scott
    Thanks, the updated version works for me :)

  10. dreamgrowers
    Member
    Posted 2 years ago #

    I'm also having the same problem with WP 3.2.1 and the latest plugin code.

    I activated it, but don't see the add secondary image in my posts?

    Also, where do I add step #4 Display the thumbnail in your theme: ? Is this a requirement? If I add to functions.php, it breaks it. Is there a certain place I am supposed to add #4?

  11. Chris Scott
    Member
    Plugin Author

    Posted 2 years ago #

    @dreamgrowers see http://wordpress.org/extend/plugins/multiple-post-thumbnails/installation/ for the code you'll need to add to functions.php to register a secondary image. For #4 you need to put it in the template where you want the image to be displayed if set, typically single.php.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic