Adding jQuery Functionality

Believe it or not, WordPress already includes the jQuery library as a part of its programming (it's used quite a bit in the dashboard). However, if you want to include your own custom jQuery code, you must invoke the desired framework with a bit of additional coding.

Open your header.php template file. Add the line of code you see highlighted below.

jQuery WordPress Invocation Code

This is a custom WordPress function (notice again the "wp") that references a specific desired script, in this case, the entirety of the jQuery library. With this added line of code, we can now write jQuery scripts as we normally would in a standard HTML file.

jQuery logo