Hi guys, I was planning to separate my javascript into its own file, but I received an error because of the “url:ajax.ajax\_url” since this code is PHP. Do you guys have an idea how to prevent this error?
https://preview.redd.it/1gx805ej13ea1.png?width=2083&format=png&auto=webp&v=enabled&s=504dafeff613d7559d9c66aa737a5f389915cae1
You need to define your file in your child theme with the wp_enqueue_script function.
This function must been add in your functions.php