What is the preferred way to add custom javascript files to the site?
Use wp_enqueue_script() in your theme The basic answer is to use wp_enqueue_script() in an wp_enqueue_scripts hook for front end admin_enqueue_scripts for admin. It might look something like this (which assumes you are calling from your theme’s functions.php file; note how I reference the stylesheet directory): <?php add_action( ‘wp_enqueue_scripts’, ‘mysite_enqueue’ ); function mysite_enqueue() { $ss_url = … Read more