Java not loading

Hello–

I am trying to add an manufacturer’s custom API to a page on our site. But when the code is installed via the Page Java code uploader, and paired with the corrisponding HTML, the the code does not appear to be propagating correctly . I spoke with the API developer and they said they’re not seeing the code showing up on the page at all despite being uploaded where it belongs in PRO. Can you help?

Hello @NickMacedo,

Thanks for writing in!

You only added this HTML code into the page:

<script src="example.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script><br />
<!-- Data output container --></p>

Be advised that you also need to upload the “example.js” file into your WordPress directory.

To get this issue resolved, you can do this:
1.) Download the Pro child theme here: https://theme.co/docs/child-themes
2.) Install and activate the Pro child theme.
3.) Log in to your FTP and browse to [your wordpress dreictory]/wp-content/themes/pro-child/js/ folder.
4.) Upload the example.js and script-filter-example.js JS files
5.) You will have to enqueue the JS files properly: https://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/
6.) Or you can simply update your HTML and supply the DIRECT file path for example:

<script src="https://example.com/wp-content/themes/pro-child/js/example.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

Best Regards.

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