javascript – Why is it recommended to insert JS through the theme, plugin, etc rather than in the post directly?


Say I have a JS script that is only needed to be used in some pages. According to this advice it is recommended to insert it through the theme, plugin, etc, not through the post. Why is that? Is it for security or management?

Related question: What are the benefits of using wp_enqueue_script?

Ooker 1 year 2022-01-08T01:54:12-05:00 0 Answers 0 views 0

Leave an answer