How to make the Facebook like button reappear after upgrading to https SSL

Did you update your WordPress website from http to https, and now your Facebook like button disappear?

Chances are you are using WooTheme’s shortcode, woo-fblike, for the Facebook like button in your template. (Actually Woothemes is now WooCommerce, so let’s call them by their correct new name).

When you update your site to https, the iframe for the Facebook like button needs to use an https address, not an http address. WooCommerce’s shortcode uses http for the Facebook iframe. Why WooCommerce doesn’t fix this, I don’t know. But it’s easy for you to fix!

How bring back your Facebook like button after upgrading to https SSL

On your FTP server find the following file:
wp-content/themes/canvas/functions/admin-shortcodes.php

Around line 641, you’ll see:

wp-content/themes/canvas/functions/admin-shortcodes.php

Just change that http to https.

$src_url = 'https://www.facebook.com/plugins/like.php

Save and upload back to your FTP.

Now your Facebook like button should reappear. Sometimes it takes a couple hard refreshes on the browser for it to reappear. Hold down the shift key and click the refresh button in your browser to do a force-refresh. If that doesn’t work, click around on your site, eventually you’ll the Facebook like button come back.

Facebook likes will reset

The sad thing is that when you upgrade your site from http to https, you’ll lose all your like counts. Every post on your site will reset back to zero. The likes are based on the URLย of the blog post. When you change the urls from http to https, the url is considered a new URL. Thus, the likes will be zero. The future of all websites is https, so you pretty much have to upgrade your site at some point. Might as well bite the bullet and do it now. But if you are reading this blog post, chances are you’ve already upgraded to https. Congrats!

Enjoyed this blog post?

Join the creatives who receive thoughtful Matt Maldre blog posts via the email newsletter
(Whenever it posts. Around 1-2 times per month)

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.