Append php file to footer
This might help you. add_action(‘wp_footer’, ‘insert_my_js_to_footer’); function insert_my_js_to_footer(){ ?> <script> // your script here. </script> <?php }; UPDATE: And if you want to append the php file itself then you can try this. add_action(‘wp_footer’, ‘insert_php_file_to_footer’); function insert_php_file_to_footer(){ include( ‘your-php-file.php’ ); };