Docs    Facebook    Customizations

Moving Custom JavaScript code out of our plugins

The Custom JavaScript field has been deprecated in our plugins. To continue using Custom JavaScript snippets, we recommend using the following approach:

1) Install the WPCode plugin (formerly known as Insert Headers and Footers). You can do this by going to your WordPress Plugins page, clicking Add New, and searching for the plugin name.

2) Once WPCode is installed and activated, go to WordPress Dashboard > Code Snippets > Header and Footer

3) Be sure to carefully review the custom JavaScript that you previously added to WordPress Dashboard > Facebook Feed > Settings > Feeds > Custom JS before adding it to WPCode.

Use the format below to add your custom JavaScript snippet into the Footer section.  Ensure that you include the entire code block, including the opening and closing <script> tags, as shown below.

<!-- Custom Facebook Feed JS -->
<script type="text/javascript">
function cff_custom_js($){
  var $ = jQuery;
  //Add your Custom JavaScript here
}
cff_custom_js($);
</script>

See the screenshot below for an example:

4) Once you’ve finished adding your custom JavaScript snippet, be sure to save your changes.

support

Couldn’t find your answer in the docs?

Contact Support