PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

support post-thumbnails

  1. I miss the possiblility to assign a "Post Fields/Image" (or "Post Fields/Custom Field/File Upload") to be a post-thumbnail.
    I'm not a Wordpress coder, but it seems that post-thumbnail just a specific kind of
    Custom Fields, so adding this feature could not be a big problem?

    Thanks
    Frank

    Posted 13 years ago on Wednesday January 5, 2011 | Permalink
  2. It is a planned feature. It won't be in the 1.5 release but we do plan on adding this capability.

    Posted 13 years ago on Wednesday January 5, 2011 | Permalink
  3. Great news!

    Next question: When do you plan to announce 1.6 ;-)

    Posted 13 years ago on Wednesday January 5, 2011 | Permalink
  4. This is a feature I'd very much like to see added, espeically as the Featured Image / post-thumbnail function is now becoming ubiquitous in WordPress themes and people are using them for all sorts of new things.

    At this point I'd settle for a hardcoded add-on to slot into the existing plugin files to add a new option under Post Fields for Featured Image.

    Posted 13 years ago on Monday January 31, 2011 | Permalink
  5. There's a solution right here that works perfectly. Just copy, paste into functions.php and you're flying:

    http://forum.gravityhelp.com/topic/auto-setting-the-the_post_thumbnail?replies=6#post-17879

    Posted 13 years ago on Tuesday February 8, 2011 | Permalink
  6. DesignWerks
    Member

    I have tried adding the code from http://forum.gravityhelp.com/topic/auto-setting-the-the_post_thumbnail?replies=6#post-17879 to the functions.php file of two different WP 3.1.1 installations with different themes and get the dreaded white screen for both until I delete it. Any insights?

    Posted 13 years ago on Monday April 11, 2011 | Permalink
  7. skeg64
    Member

    Hi,
    Same problem here as DesignWerks. I get a white screen using WP 3.1.2. Does the above code need to be modified for 3.1?

    EDIT: Figured it out. The function set_post_thumbnail has been added to Wordpress core as of 3.1 (http://core.trac.wordpress.org/ticket/15192).
    Just change the name of the function and it works again, eg.

    add_filter("gform_post_submission", "set_gform_post_thumbnail", 10, 2);
    function set_gform_post_thumbnail($entry, $form){
    Posted 12 years ago on Tuesday May 10, 2011 | Permalink
  8. Thanks everyone. This was a big help.

    Posted 12 years ago on Wednesday June 1, 2011 | Permalink
  9. Hi, I have added the above code in the functions.php file. I got the following error:
    Fatal error: Call to undefined function add_filter() in ..... functions.php.

    Suggestions?

    Posted 12 years ago on Saturday June 4, 2011 | Permalink
  10. @Jelle Make sure you are running the latest version of WordPress. That filter uses a built in WordPress function so it shouldn't be undefined unless you are running an older version that doesn't have it implemented.

    Posted 12 years ago on Sunday June 5, 2011 | Permalink
  11. @Carl Thanks for the reply. I am running the latest version of Wordpress; just started building my website. Any other suggestions? Does it matter where I insert the code eg?

    Posted 12 years ago on Monday June 6, 2011 | Permalink
  12. You would want to place the code in your themes functions.php file. That is where custom code typically goes.

    Posted 12 years ago on Monday June 6, 2011 | Permalink
  13. Does anyone know how I could also provide a default featured image based on category for created posts?

    Posted 12 years ago on Monday June 6, 2011 | Permalink
  14. Hi bgdan,

    This would be a bit trickier than it sounds. The featured image has to be an image that is attached to the post. As far as I know, an attachment (image) can only be attached to one post. This means you'd have to handle generating a new category-specific attachment (image) every time you created a new post.

    This would be probably be much easier and make more sense to handle this from the template side of things. You can create a category-specific custom field and then created a custom template to display these posts and use the custom field value to determine which image you display.

    Posted 12 years ago on Monday June 6, 2011 | Permalink
  15. Thanks David, I shall give that a go.

    Posted 12 years ago on Tuesday June 7, 2011 | Permalink
  16. @Carl Thanks! It works.

    Posted 12 years ago on Friday June 10, 2011 | Permalink
  17. It works okay for me only if I set new posts to draft and then publish them manually... Can this feature work with form submission that publish posts?? BIg bummer for me as this is the only reason i bought the form plugin...

    Posted 12 years ago on Sunday July 10, 2011 | Permalink