• I’m using the Custom Upload Dir plugin, which is really just a quick & dirty way of creating named subfolders under the main uploads folder (in this case /../gallery under root).

    I can call the images using literal links but neither get_post_thumbnail nor get_the_post_thumbnail works. I had specified a number of custom sizes in functions.php, called things like product-medium, product-large, etc but even the default get_post_thumbnail() returns nothing. I’ve uploaded files to these directories and all of the folders contain the proper files.

    All the images show up in the media library as being attached to specific posts–as intended–but nothing is actually displayed on the site.

    Is there possibly something I’m missing in my functions.php file when specifying custom sizes? I followed the directions closely and have had no PHP errors with that.

    Any suggestions would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ixwa

    (@ixwa)

    For get_post_thumbnail or get_the_post_thumbnail to work does the original image have to be INSERTED into the post? Or should it work if it’s just an attachment?

    It just has to be in your Media Library.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_the_post_thumbnail not working for subfolders?’ is closed to new replies.