Where and how to put inline js in pages
Question
On the internet there are thousand of articles on how to insert external scripts using wp_enqueue_script().
Anyway i didn’t find anything explanatory on how to add inline, <script>
enclosed, scripts.
I use to add them in the middle of the page code but i suppose it’s not the most elegant way and there should be a better way, so that the script code is automatically moved in the head or the footer.
Any ideas?
Edit: I forgot the ‘ around <script>
so it got cancelled. Now my question should be clearer
0
javascript, pages
11 years
2012-05-08T18:47:43-05:00
2012-05-08T18:47:43-05:00 0 Answers
89 views
0
Leave an answer