I have an application that uses wordpress and I need to add a javascript in it, I have seen several videos and posts on the internet and from what I understand it is just to do this:
<?php
wp_register_script("meuscript", "js/meuscript.js");
function my_scripts_loader() {
wp_enqueue_script("meuscript", "js/meuscript.js");
}
add_action("wp_enqueue_scripts", "my_scripts_loader");
?>
But I do not know where to add this code I was kind of confused, I saw something about adding to the theme or something