I'm new to Wordpress and I want to echo a script and a css file inside the footer.php . This is the code that I use.
echo "<script src='file.js'></script>";
echo '<link rel="stylesheet" type="text/css" href="file.css">';
The problem is that the codes are appearing at the top of the document, although I place them in the bottom of the footer.php file. Why is this happening?
<link>
tags outside the<head></head>
tags is invalid HTMLwp_enqueue_scripts
to add styles and scripts