K
K
karpo5182018-02-03 02:19:34
WordPress
karpo518, 2018-02-03 02:19:34

How to move jQuery to the footer in Wordpress?

The script is connected dynamically using the wp_head() function. I found several recipes on this topic, but none of them work if plugins are used that have jQuery as dependencies. At the same time, the javascript code of these plugins is easily transferred to the footer via the wordpress API. That is, transferring jQuery to the footer will not break these plugins, but this particular library cannot be transferred. I would not like to edit the plugin code by hand, disabling jquery, so that later I can include it in the footer manually. This will break the ability to update. So far, the only thing that comes to mind is wrapping wp_head() in ob_start() and displaying the contents of the buffer in the footer. WordPress experts, tell me how to do it right?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question