Facebook Like Button

Hi,

I want to implement the Facebook like button on my website. I already did this, actually, but I used the iFrame and I think it might slow down the loading speed of the page. I’m not sure if the JavaScript method is faster.

I found this in another article:

the facebook widget provided you two sets of codes right? The first block is a JavaScript SDK which needs to be put as close as possible on the tag.

To do this first navigate to this directory:
x/framework/legacy/cranium/headers/views/global/ and copy the file _header.php

Then on your child theme navigate to this directory:
x-child/framework/legacy/cranium/headers/views/global/
If this directory does not exist, create it. Then there paste the _header.php file that you just copied.

Then open and edit the copied _header.php file, put the FB JavaScript SDK code just below the line:

>

After that you can place the second code (actual widget code) wherever you want the like button to appear on your page.

But it doesn’t work. When I put the second code in a content field it doesn’t show anything. I had to create a global folder in the Child-X theme folder. Is ideas what I could have done wrong or why it might not be working?

thanks in advance,
Dennis

Hi There,

Thank you for writing in, I see that you successfully added the FB SDK code on your site.


But where did you paste the “like button code”? I don’t see the code for it on your page content?

Like Button for the Web

You can put it on a RAW Content element.

Hope it helps,
Cheers!

It’s on this page:
https://soundtrackz.de/filme/prinzessin-mononoke

Apparently it works now, but it doesn’t show the button in the cornerstone preview

Glad to hear it works.

Since you are loading an external source it can be the cause of not loading on Cornerstone but on live site.

Thank you

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.