Forum Support

Advanced Search

New Posts
FAQs for Wordpress
If you have a question about Wordpress products please read through a list of our most commonly asked questions here.

Offline CloudTek
Free Member
Posts: 100
Posted on: March 14, 2018, 10:56:56 AM

Where's the best place to put the JS SDK code?

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); = id;
  js.src = '';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Offline Tristan Rineer
Free Member
Posts: 3858
Posted on: March 15, 2018, 11:04:30 AM

There are a couple different options:

The option that I prefer is to use a custom HTML widget located in the "Debug" position.  Using the widget method in combination with Widget Context allows you to only include the code on pages that need it.

The other option is to put the code in one of the provided spaces on the "General" tab of the theme options.

Jump to:  

Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by
Page created in 0.019 seconds with 21 queries.
Need some help getting your site up and running? Be sure to check out our tutorials area, post on the forum or hire us
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.