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 trial

WordPress From Bootstrap to WordPress Create Bootstrap Styled Theme Templates Creating a Portfolio Landing Page

Issues displaying thumbnails

Hello Everyone,

Working on this layout for the main portfolio page and I ran into an issue with the code being used on line 53:

$thumbnail_url = wp_get_attachment_image_src( $thumbnail_id, 'medium', true );

As you can see I had to go with 'medium' in this line - when I was putting in 'thumbnail-size' as mentioned in the tutorial the images would all show up full size. Is there something I am missing here? Anyone else having this same issue?

1 Answer

Kevin Korte
Kevin Korte
28,148 Points

I'm not sure why the tutorial said it should be 'thumbnail-size' but the wordpress codex clearly shows it should be the string 'thumbnail'. Your options are 'thumbnail', 'medium', 'large', or 'full'

http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src