Because When we develop new wordpress themes then we include the jquery files in that theme.
In this tutorial I will give very simple and basic tips about using jquery in wordpress themes. Using jquery we will introduce very nice effect in our website. with jquery we can generate the more traffic to our website.
We can add the Jquery in wordpress theme with very minimal effect. wordpress is given the api for including the jquery in our wordpress theme.
Add Jquery in wordpress theme
For adding the jquery in wordpress you just need to use header.php or functions.php file and put following code in that file.
For header.php put following code in that file.
<?php wp_enqueue_script(‘jquery’); ?>
If you want to use the functions.php file for adding the jquery then use following code.
Above are the very simple and basic tips for adding the jquery in your wordpress theme.
This code will include the latest jquery file in your wordpress theme.
I Purab am from India, Pune. I am WordPress and Drupal Architect and consultant. I worked on many technologies like Ruby on Rails, Flex, PHP, jQuery etc...
Senior Technical Lead at Smartsourcing Global Pvt Ltd in Princeton, NJ, USA.
I contributed to many wordpress plugins and Drupal Modules. I contributed to Drupal core also.
Connect to purab on LinkedIn or
Follow @purab on Twitter or
Follow me on Google+ or
Write Mail to
Chat with me on Skype : purabdk