Can't use JS in cornerstone

Hey there,

Trying to insert a JS for a leadpages pop-up I’ve created.

Anytime I have JS on the page (whether it’s in the JS area OR with “raw code”), Cornerstone does not complete the save. The green bar never makes it to the end (despite it saying it has saved).

Any help would be appreciated!

Edit: Realizing that if I put the JS button at the beginning of the page it works. Middle/end of the page, no luck.

Hi @stevedonnelly,

Thanks for writing in.

In this case, please share us your admin credentials and the script that you want to use so we could check why it is not working.

Don’t forget to set it a secure note.

Thanks.

Thanks, Nico. Updated with secure note. Let me know what else you need.

Hi There,

See this: https://screencast-o-matic.com/watch/cbQvhfIxKI

Please add the following line of code on a child theme instead. See this guide: https://theme.co/apex/forum/t/customizations-actions-and-filters-in-x/208

Something like this:

function third_party_code() { ?>

  <script src="https://www.pumpone.com/pl_embed/history/history.js" type="text/javascript" ></script>
  <script src="https://www.pumpone.com/pl_embed/private_label_helper.js" type="text/javascript"></script>
<?php
}
add_action( 'wp_head', 'third_party_code' );

You may change wp_head to wp_footer to add the code on footer instead.

Hope this helps.