Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjazib shahzad
Courses Plus Student 268 PointsFeatured images is not showing
I followed the video and add this code in functions.php file
add_theme_support( 'post-thumbnails' );
but i didn't work for me. Then I go to CPT UI and in Add/Edit post type I go to Edit Post Type from the top tab and then select portfolio and at the bottom I checked the box of Featured Images and then save the post. After doing this it should show featured images option but it didn't. Can someone HELP ME???????
6 Answers
Chiedo Labs
3,882 PointsFor any future watchers make sure: You go to CPT UI => edit post type => select 'portfolio' => scroll all the way to the bottom => check supports: Featured Images.
Lee Thomas
6,500 PointsTop comment, was wondering why mine wasn't showing. Zac needs to add this to the video really, essential information.
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsAh ha!! THANK YOU!!!
Mark Phillips
13,124 PointsThat did the trick. Thank you.
Catherine Millington
3,754 PointsMine wouldn't work either but I have now un-ticked the feature images (to show it) box on both the description and the image fields. Was just doing the image field before. Works now :o)
Stanley Thijssen
22,831 PointsHey Jazib,
Make sure the featured image IS checked at the support section of your custom post type and then save it.
After that add:
add_theme_support( 'post-thumbnails' );
This should be working.
jazib shahzad
Courses Plus Student 268 PointsI checked both things are fine but again features images is not displaying
Stanley Thijssen
22,831 PointsWhat do you have checked at the support section?
jazib shahzad
Courses Plus Student 268 PointsThanks Thijassen but featured image IS is checked at support and I saved it too but it didn't give the result.I'm stuck here
Stanley Thijssen
22,831 PointsThats pretty weird.
Can you try to copy my function:
add_theme_support( 'post-thumbnails' );
save it and try again?
Michael Hanna
17,649 PointsThank you, Stanley! That fixed my issue. I didn't have that box checked in my custom post type settings.
Samuel Schumacher
5,259 PointsOdd... I would try deleting your custom "portfolio" post type and then making a new one and see if that fixes things. If that doesn't work, you could try re-installing WordPress (while still keeping all your website content) by going to Dashboard -> Updates and click the "Re-install Now" button. See here on the WordPress Codex for more details.
jazib shahzad
Courses Plus Student 268 PointsThanks! Yeah I already did that and now it's working fine. do u have skype? we can discuss more
Samuel Schumacher
5,259 PointsI actually don't use Skype very much, but if you have any more questions I'd be glad to help you with them on Treehouse! Also, if you could upvote the answer that solved your issue, I'd greatly appreciate it :)
Jake Porritt
10,356 PointsI have the same problem. I tried the "re-install" and that hasn't worked either.
Samuel Schumacher
5,259 PointsI actually had this same issue when I learned how to do this. Here's what worked for me: Go to the "Custom Fields" tab (Advanced Custom Fields Plugin) and click your custom post type to edit it. Make sure that in the Options at the bottom of the page that "Featured Image" is NOT checked (checking this box means that WordPress will hide it).
Hope this fixes your issue!
jazib shahzad
Courses Plus Student 268 Pointsfeatured image isn't checked annd same problem.....
jazib shahzad
Courses Plus Student 268 PointsI pasted ur statement although it was in functions.php file but nothing new.I try to go forward without that but my site was not showing images which I added later which could be due to unavailability of "featured images".
Jerad Johnston
18,335 PointsJerad Johnston
18,335 PointsI had to add it in like this in functions.php to get it to work
add_theme_support( 'post-thumbnails' , 'portfolio') );
or just use an array for other custom post, etc. like
add_theme_support( 'post-thumbnails' , array('post' , 'page' , 'portfolio') );
but looks like the CPT UI has been updated since these videos.