Support » Fixing WordPress » Problem concerning SSL and get_the_post_thumbnail?

  • Has anyone encountered a problem with get_the_post_thumbnail on a ssl site?

    It was throwing out non-secure image links. I solved the problem with a manual php function on our site already.

    The question now is if it was a singular problem with the child theme or setup or if it’s a general problem/bug.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    Which theme? I just tried the SSL version of my test blog and the thumbnail is via an SSL URL.

    My theme does thumbnails differently so I want to see if I can reproduce it on my Crash Test Dummy blog.

    Twenty Eleven (in a self-created child theme where no changes where made concerning the thumbnails)

    Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    Switching the Crash Test Dummy to Twenty Eleven… Done. Huh, it’s doing the same thing.

    Okay, I see what’s happening. My post has the image saved with the http:// while before my old theme was showing the thumbnail in the excerpt. That thumbnail was dynamic and was getting https://.

    Just for giggles I used the search and replace plugin and replaced all of my blog URLs with the https:// version (it is a crash test dummy after all).

    That, with also setting the WordPress URL and Site URL to the https, made almost everything on my blog SSL based. Internet Explorer still complained because not quite 100% of all the URLs were SSL based but when I told it not to load the unencrypted URLs I couldn’t notice anything missing.

    Not sure that counts as a bug exactly, but if you have a work around that’s probably good.

    Dave Ross


    I know I’m late to the party here, but I just had the same issue. Solved it by using protocol relative URLs for my WP_HOME and WP_SITEURL in wp-config.php. So something like:


    It comes down to how wp_upload_dir() builds URLs for post attachments. It’s just using the info we gave it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem concerning SSL and get_the_post_thumbnail?’ is closed to new replies.