Adding jQuery in WordPress

load up jQuery in your theme
Put the following code in your header.php file in the section:

Call the wp_enqueue_script function before the wp_head function.Now call your own jQuery JavaScript file, after the wp_head function.

Here yourscrip=name of your javascript file.

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



Also Read:  WordPress Speculation Rules Dynamic Prefetching and Prerendering

Leave a Reply