I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Reply To: ? – Exchange Chart Timeframe

dashed-slug.net Forums Exchange extension support ? – Exchange Chart Timeframe Reply To: ? – Exchange Chart Timeframe

#5879
alexg
Keymaster

Hello Megan,

The above JavaScript code can be added by enqueueing it as part of your child theme. Use wp_enqueue_script() in your functions.php file to reference the .js file: https://developer.wordpress.org/reference/functions/wp_enqueue_script/

You should not have to worry about dependencies: the code does not reference the wp object on the first pass. If the event is trigerred, this means that all the prerequisites have already been loaded. Simply give a unique handle and the path to the script, like so:

wp_enqueue_script('my-wallets-exchange-js', '/path/to/your/javascript.file.js' );

If you don’t want to enqueue the script, there are also plugins that let you easily add JavaScript tags to your pages. For example, with a quick search I found this: https://wordpress.org/plugins/header-and-footer-scripts/

with regards