How to put my javascript in the footer

Use a functions.php file inside your theme template add this


<?php

function add_this_script_footer(){ ?>

[YOUR JS CODE HERE]

<?php } 

add_action('wp_footer', 'add_this_script_footer'); ?>