Docs    Facebook    Customizations

Using Custom JavaScript code in our plugins

To use Custom JavaScript snippets in our plugins, 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) Use the following format 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

Was this article helpful?