Answer the question
In order to leave comments, you need to log in
Am I trying to reconnect JS scripts in wordpress correctly?
js scripts are connected to wp_footer through the plugin (see screenshot)
, there is a need to connect them in a separate file (via function.php).
To connect these scripts, it is enough to remove them from custom codes and add them to a separate file, which is connected using wp_enqueue_script in function.php?
Answer the question
In order to leave comments, you need to log in
Well... you have a js code wrapped around it <script>.*</script>
Remove these tags, create a separate js file, and then use wp_enqueue_script to include it. Since the script must work with jQuery, it will not be superfluous to add a script dependency on jQuery
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question