WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Get post thumbnail/ featured image to show up for custom post types? (10 posts)

  1. HeroicNate
    Member
    Posted 4 years ago #

    I'm trying to enable post-thumbnails, or rather featured images as they seemed to be updated to, for all my posts and custom post types. I'm using the code from: http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/ , and that works to let them show up in regular post write screens, but the custom post types write panels don't have the featured image on it. I have the custom post types supporting "thumbnail". But it's a no go. Has the code changed to a new phrase for supporting the now "Featured Image"?

  2. Nile Flores
    Member
    Posted 4 years ago #

    I wrote not long ago a tutorial on the post thumbnails. I use this and it works great. There are actually 3 tricks in the post, but it is the 2nd one that might help.

    http://www.famousbloggers.net/3-wordpress-tricks.html

  3. HeroicNate
    Member
    Posted 4 years ago #

    thanks for the response, but nothing in that article explains how to deal with custom post types.

  4. HeroicNate
    Member
    Posted 4 years ago #

    i see that one of my old post from months ago was reposted in, I should delete one of these, but I don't see a way to.

  5. c.note
    Member
    Posted 3 years ago #

    add_theme_support( 'post-thumbnails', array( 'post','custom-post-type-here','another-custom-post-type' ) ); // Add it for posts

  6. sballinger26
    Member
    Posted 3 years ago #

    i want to show list of featured images on home. how can i do this?

    any help would be appriciated

    thanks in advance

  7. c.note
    Member
    Posted 3 years ago #

    i recently did what i think you are requiring using this plugin: multiple post thumbnails. find it here http://wordpress.org/extend/plugins/multiple-post-thumbnails/

  8. bmil21
    Member
    Posted 3 years ago #

    You need to add this bit of code to the functions.php file so that the featured image will show up in the admin...

    add_theme_support('post-thumbnails');

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    to actually answer the original question, in case anyone comes across this thread...

    'supports' => array( 'title', 'editor', 'comments', 'excerpt', 'custom-fields', 'thumbnail' ),

    when registering your custom post type, you must add the thumbnail support. Here is an example from my supports line, adding my required items to my CPT

  10. mture
    Member
    Posted 3 years ago #

    Hey c.note, multiple post thumbnails looks incredibly useful. I was just talking to my sister about her portfolio site, which will need this. Thanks for that!

Topic Closed

This topic has been closed to new replies.

About this Topic