How to Use WordPress’ built in Script Libraries – Tip

WordPress comes with a lot of built in Javscript libraries, frameworks, plugins..etc that you can use in your themes with a single line of code. You will find a list of scripts bundled with WordPress here. I will show you how to add “Jquery” and “Prototype” to your themes.

Jquery

Simply add the script below above your wp_head(); in your header.php.

<?php wp_enqueue_script("jquery"); ?>

Prototype

Add the code below above your wp_head(); in your header.php.

<?php wp_enqueue_script("prototype"); ?>

That’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>